Skip to content

Conversation

@androm3da
Copy link
Contributor

The QuRT RTOS -- used primarily on the Hexagon architecture -- has support for large parts of POSIX.

Description

Add support for Hexagon QuRT OS.

Sources

The corresponding sources from the Hexagon SDK from https://github.com/snapdragon-toolchain/hexagon-sdk or https://softwarecenter.qualcomm.com/catalog/item/Hexagon_SDK

Checklist

  • N/A - Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

The QuRT RTOS -- used primarily on the Hexagon architecture --
has support for large parts of POSIX.
Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to update

libc/build.rs

Lines 33 to 49 in a3bb40e

// Extra values to allow for check-cfg.
const CHECK_CFG_EXTRA: &[(&str, &[&str])] = &[
(
"target_os",
&[
"switch", "aix", "ohos", "hurd", "rtems", "visionos", "nuttx", "cygwin",
],
),
(
"target_env",
&["illumos", "wasi", "aix", "ohos", "nto71_iosock", "nto80"],
),
(
"target_arch",
&["loongarch64", "mips32r6", "mips64r6", "csky"],
),
];
to make check-cfg work, since this target is only on nightly so far.

Comment on lines +5 to +15
pub(crate) mod errno;
pub(crate) mod fcntl;
pub(crate) mod limits;
pub(crate) mod pthread;
pub(crate) mod semaphore;
pub(crate) mod signal;
pub(crate) mod stdio;
pub(crate) mod stdlib;
pub(crate) mod sys;
pub(crate) mod time;
pub(crate) mod unistd;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this needs to be filled in right? Or deleted.

I'd appreciate if you could at least make unistd.rs and pthread.rs in src/new roughly matching their .h files, since I've ported most other platforms at this point. Everything else is up to you; you can either add the modules like you have here (eventually everything will hopefully be like this) or just put it all in src/qurt like most other platforms (and I'll move them over later).

Comment on lines +1 to +3
//! QuRT (Qualcomm Real-Time OS) bindings
//!
//! QuRT is Qualcomm's real-time operating system for Hexagon DSP architectures.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind adding a link to the SDK sources?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, in the PR comments or in the comments of src/new/qurt/mod.rs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc comment - I've been doing this for src/new to give some breadcrumbs for anyone who wants to check / update things.

@rustbot
Copy link
Collaborator

rustbot commented Nov 30, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants