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

Add std support for armv7a-vex-v5 #145973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Tropix126 wants to merge 23 commits into rust-lang:master
base: master
Choose a base branch
Loading
from vexide:vex-std
Open

Conversation

Copy link
Contributor

@Tropix126 Tropix126 commented Aug 28, 2025
edited
Loading

This PR adds standard library support for the VEX V5 Brain (armv7a-vex-v5 target). It is more-or-less an updated version of the library-side work done in #131530.

This was a joint effort between me, @lewisfm, @max-niederman, @Gavin-Niederman and several other members of the vexide project.

Background

VEXos is a fairly unconventional operating system, with user code running in a restricted enviornment with regards to I/O capabilities and whatnot. As such, several OS-dependent APIs are unsupported or have partial support (such as std::net, std::process, and most of std::thread). A more comprehensive list of what does or doesn't work is outlined in the updated target documentation. Despite these limitations, we believe that libstd support on this target still has value to users, especially given the popular use of this hardware for educational purposes. For some previous discussion on this matter, see this comment.

SDK Linkage

VEXos doesn't really ship with an official libc or POSIX-style platform API (and though it does port newlib, these are stubbed on top of the underlying SDK). Instead, VEX provides their own SDK for calling platform APIs. Their official SDK is kept proprietary (with public headers), though open-source implementations exist. Following the precedent of the armv6k-nintendo-3ds team's work in #95897, we've opted not to directly link libstd to any SDK with the expectation that users will provide their own - either through vex-sdk-build (which will download the official SDK from VEX), vex-sdk-jumptable (a compatible, open-source reimplementation), or potentially through linking the PROS kernel. The vex-sdk crate used in the VEXos PAL provides libc-style FFI bindings for any compatible system library, so any of these options should work fine. A functional demo project using vex-sdk-build can be found here.

Future Work

This PR implements virtually everything we are currently able to implement given the current capabilities of the platform. The exception to this is file directory enumeration, though the implementation of that is sufficiently gross enough to drive us away from supporting this officially.

Additionally, I have a working branch implementing the panic_unwind runtime for this target, which is something that would be nice to see in the future, though given the volume of compiler changes i've deemed it out-of-scope for this PR.

ion098, Blueblob860, aadishv, lewisfm, Gavin-Niederman, ABUCKY0, fibonacci61, jmakif, TymanWasTaken, and max-niederman reacted with thumbs up emoji ion098, Blueblob860, meisZWFLZ, aadishv, Gavin-Niederman, ABUCKY0, fibonacci61, jmakif, TymanWasTaken, and max-niederman reacted with hooray emoji
Copy link
Collaborator

rustbot commented Aug 28, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

meisZWFLZ reacted with thumbs up emoji meisZWFLZ reacted with rocket emoji

@rustbot rustbot added A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 28, 2025
Copy link
Collaborator

rustbot commented Aug 28, 2025

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

These commits modify the library/Cargo.lock file. Unintentional changes to library/Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

These commits modify compiler targets.
(See the Target Tier Policy.)

The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging.

cc @davidtwco, @wesleywiser

meisZWFLZ reacted with thumbs up emoji meisZWFLZ reacted with rocket emoji

Copy link
Contributor

I think the limitations here seem fine, and from a quick skim nothing jumps out to me as problematic. Nominating to make sure the team doesn't have any concerns.

@rustbot label +I-libs-nominated

@rustbot rustbot added the I-libs-nominated Nominated for discussion during a libs team meeting. label Aug 28, 2025

This comment has been minimized.

Copy link
Contributor

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 30, 2025
Copy link
Collaborator

rustbot commented Aug 30, 2025

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

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 30, 2025
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 30, 2025
Copy link
Contributor

Thanks for the updates here, I'll take a more thorough look through after the libs meeting (next Wednesday).

@tgross35 tgross35 added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 30, 2025
Copy link
Collaborator

bors commented Sep 3, 2025

☔ The latest upstream changes (presumably #146160) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Collaborator

rustbot commented Sep 3, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

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

@tgross35 tgross35 tgross35 left review comments

+1 more reviewer

@lewisfm lewisfm lewisfm requested changes

Reviewers whose approvals may not affect merge requirements
Labels
A-tidy Area: The tidy tool I-libs-nominated Nominated for discussion during a libs team meeting. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

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