This folder contains a library for message passing on QNX OS 8.0, using the name_attach and MsgSend APIs.
Build the code with
criticalup run cargo build --examplesCopy ./target/x86_64-pc-qnx/debug/examples/server to a QNX OS 8.0 system and run:
./server <server_name>Where <server_name> is the name of a file that will appear in /dev/name/local.
Copy ./target/x86_64-pc-qnx/debug/examples/client to the same QNX OS 8.0 system and run:
./client <server_name> <message>Where <server_name> is the same name given to the server, and <message> is some string.
If <message> is the string "Hello" you will get a reply from the server. Otherwise you will get error code -123.
[qnxuser@qnxqemu ~]$ ./client my_server Hi
Client connecting to "my_server"...
Client running...
Error: Unknown Error -123
[qnxuser@qnxqemu ~]$ ./client my_server Hello
Client connecting to "my_server"...
Client running...
Got back rc=16, data="Hello, yourself!"
All done!
[qnxuser@qnxqemu ~]$ Because this uses the x86_64-pc-qnx target, you will need a recent nightly build of Ferrocene, or to build the QNX standard library yourself. It should also work with the aarch64-unknown-qnx target, and may also work with QNX SDP 7.1 targets too (although this is untested).
- Copyright © 2026 Ferrous Systems
- SPDX-License-Identifier: MIT OR Apache-2.0