Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Re-organized the QNX support.#4984

Open
jonathanpallant wants to merge 1 commit intorust-lang:main from
ferrocene:reorganise-qnx
Open

Re-organized the QNX support. #4984
jonathanpallant wants to merge 1 commit intorust-lang:main from
ferrocene:reorganise-qnx

Conversation

@jonathanpallant
Copy link

@jonathanpallant jonathanpallant commented Feb 18, 2026

Description

As most of the differences are related to the change in network stack half-way through the life of QNX Neutrino 7.1, the definitions are now split into io-pkt (the older stack) and io-sock (the newer stack).

I didn't add any architecture definitions for x86 (as would be required for i686-pc-nto-qnx700) because I don't have access to QNX Neutrino 7.0 to verify what should go here. But there's a clear place to add it later.

I do have QNX Neutrino 7.1 and QNX OS 8.0 and I have verified each of the types in the io-pkt and io-sock modules against the relevant C header files. I have not verified the remaining types or functions - I assume they are correct.

This is an alternative to #4615, which seems to have stalled.

Sources

For io-sock, QNX says:

The io-sock networking stack supports all the routines that application programmers would expect, including (but not limited to) the functions listed below. The FreeBSD 13.5 manual pages at https://www.freebsd.org/cgi/man.cgi are the best guide to their use:

For io-pkt, you can refer to https://www.qnx.com/developers/docs/7.1/.

Checklist

  • Relevant tests in libc-test/semver have been updated
    • There aren't any for QNX
  • No placeholder or unstable values like *LAST or *MAX are included (see #3131)
    • I left all the existing ones
  • Tested locally (cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI
    • I tried running this locally and I got: not implemented: Foreign functions are unlikely to have any other pattern. I don't know if we normally run the tests for this target.

As most of the differences are related to the change in network stack
half-way through the life of QNX Neutrino 7.1, the definitions are now
split into io-pkt (the older stack) and io-sock (the newer stack).
I didn't add any architecture definitions for x86 (as would be required
for i686-pc-nto-qnx700) because I don't have access to QNX Neutrino 7.0
to verify what should go here. But there's a clear place to add it
later.
I do have QNX Neutrino 7.1 and QNX OS 8.0 and I have verified each of
the types in the io-pkt and io-sock modules against the relevant C
header files. I have not verified the remaining types or functions - I
assume they are correct.
Copy link
Author

Force push some formatting fixes.

Copy link
Author

I tried to tell bootstrap to use this libc, but this repo has 1.0.0-something and my rust source build wants libc 0.2, so it ignored the patch.crates-io entry. If anyone has any advice on how to build a libstd for QNX using this, I'd be happy to try.

Copy link
Author

I rebased these changes onto the libc-0.2 branch, built a libstd for AArch64 QNX 7.1 with io-sock, built some test programs that do threading and networking, sent to them an AArch64 QNX Neutrino 7.1 instance on AWS, and they worked OK. So I'm fairly confident I've not broken anything catastrophically.

I can send the libc-0.2 PR once this is merged, if that's useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Comments

AltStyle によって変換されたページ (->オリジナル) /