-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Proposal
Add target tier 3 support for QuRT RTOS on Hexagon.
Motivation, rationale
QuRT is the most widely deployed OS on Hexagon ISA cores. It's used in compute DSPs, audio DSPs, and more. It's likely that it's the only OS used on the Hexagon cores in commercial Snapdragon/Dragonwing devices.
Today, users can deploy rust no_std programs to QuRT targets using the hexagon-unknown-none-elf baremetal target. But having access to libstd opens up the number of use cases significantly.
- QuRT has support for large portions of POSIX dependencies of
libcincluding threads, filesystems, time, signals. - As it has been for the other hexagon targets, the contributions made to support
hexagon-unknown-qurtwill be made under the standard Rust license. - I'll (@androm3da) be the maintainer and will continue to seek out additional maintainers for this and the other hexagon targets.
- QuRT doesn't have interactive shells, it wouldn't make sense as a platform to host Rust tools. So it'll be designated strictly as a cross-compiled target.
- Existing clang toolchains use
hexagon-unknown-elf(fromhexagon-clang) as a generic target that can include QuRT and users/build systems targeting QuRT explicitly add the necessary include, library paths. Writing portable code for QuRT and other OSs can be challenging or awkward in the status quo. I believe this will stay this way but I don't believe that Rust usinghexagon-unknown-qurtinstead should cause problems. This is a good subject for discussion in the MCP because it's identified as a concern when creating new targets, including tier 3 ones.
Target Policy
The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy.
Yes, confirmed.
Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries.
... the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library.
Yes: this target will use rust-lld by default and optionally the open-source eld linker. The integrated MC assembler or llvm-mc assembler can be used.
ncorporating the target and redistributing any resulting compiled binaries (e.g. built libraries, host tools if any) must not impose any onerous license requirements on any members of the Rust project, including infrastructure team members and those operating CI systems.
The terms of the Hexagon SDK are not onerous. Also: the SDK is freely downloadable.
Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate),
Yes: I plan to implement as much of std as is supported by QuRT.
Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target.
Confirmed: the maintainers will not intervene progress of other PRs for issues related to this target.
Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target.
Acknowledged.
Tier 3 targets must be able to produce assembly using at least one of rustc's supported backends from any host target
The integrated LLVM MC assembler or llvm-mc can be used.
Mentors or Reviewers
I expect to do the work but welcome mentorship from @bjorn3 or @tgross35 or anyone else on the team willing to provide guidance.
Process
The main points of the Major Change Process are as follows:
- File an issue describing the proposal.
- A compiler team member who is knowledgeable in the area can second by writing
@rustbot secondor kickoff a team FCP with@rfcbot fcp $RESOLUTION.- Refer to Proposals, Approvals and Stabilization docs for when a second is sufficient, or when a full team FCP is required.
- Once an MCP is seconded, the Final Comment Period begins.
- Final Comment Period lasts for 10 days after all outstanding concerns are solved.
- Outstanding concerns will block the Final Comment Period from finishing. Once all concerns are resolved, the 10 day countdown is restarted.
- If no concerns are raised after 10 days since the resolution of the last outstanding concern, the MCP is considered approved.
You can read more about Major Change Proposals on forge.
Note
Concerns (0 active)
legal-reviewresolved in this comment
Managed by @rustbot—see help for details.