Rust application on QNX


#1

I’m pretty new to Rust programming, but I was wondering if anyone has tried to compile a Rust program for QNX.

Thanks


#2

I don’t have the answer but I am also very curious about the relation of Real Time OS and Rust.

It seems most Rust features would be really beneficial in hard Real time embedded environment : safety, close to the metal, no GC. It is a match made in heaven.

From my understanding, if you are using libstd, at some point, when you spawn a thread you are actually calling the OS implementation as seen in /src/libstd/sys (as well as other OS dependent feature)

So far I am not sure there is any plan to support anything else than Posix & Windows.

Probably at this point your options are to only depends from core.

But I am curious to know what would be the proper way to support a custom os. Relying on core + wrapping every specific call in a QNX crate ?

As far I understand a project like Redox is trying to develop a general purpose OS, but not a RT one.

Is there any plan to support at least once RTOS ?(The issue is the most popular one like QNX or Vxworks are proprietary and it is less easy to experiment with)


#3

Did you make any progress on getting rust + QNX working? I have a project that would benefit from it too. Plan B is a rewrite in C++ :slight_smile:


#4

It is not listed here.


#5

Hi folks!

I just grabbed a 30-day trial of QNX 7 in order to determine if this is even possible since we were starting to adopt Rust at work yet have a requirement to support QNX as well as Linux. If anyone else is interested then maybe we can continue this conversation here or another thread. Or ping me on irc (photex).


#6

Just a thought:

Rust can be built for bare metal, maybe you can set a custom target specification to specify what the rust can be built on.

and if you want and QNX can support std, you need to rebuild std for your platform


#7

Do you plan to port LLVM to QNX


#8

Well, at the time I started looking into this I was under the impression that llvm supported QNX already. They provide libc++ in QNX 7 so there is at least some comingling going on there.
In general QNX claims to be POSIX compliant which gives me the sense that it should be possible.

My current troubles at the moment are largely my ignorance. I don’t really know where to begin here. Should I just see if I can build Rust with the QNX toolchain first? Learn how to use xargo and try that approach?


#9

There is a port of ancient llvm for qnx 6.5.0, see openqnx. That might give u an idea whst patches are required


#10

Awesome tip thanks!