-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Conversation
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.
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
This comment has been minimized.
This comment has been minimized.
@rustbot author
Reminder, once the PR becomes ready for a review, use @rustbot ready
.
@rustbot ready
Thanks for the updates here, I'll take a more thorough look through after the libs meeting (next Wednesday).
☔ The latest upstream changes (presumably #146160) made this pull request unmergeable. Please resolve the merge conflicts.
3288184
to
09ab298
Compare
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.
Uh oh!
There was an error while loading. Please reload this page.
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 ofstd::thread
). A more comprehensive list of what does or doesn't work is outlined in the updated target documentation. Despite these limitations, we believe thatlibstd
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 thearmv6k-nintendo-3ds
team's work in #95897, we've opted not to directly linklibstd
to any SDK with the expectation that users will provide their own - either throughvex-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. Thevex-sdk
crate used in the VEXos PAL provideslibc
-style FFI bindings for any compatible system library, so any of these options should work fine. A functional demo project usingvex-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.