-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Build the rust-std component for embedded targets #49382
Comments
cc @phil-opp |
Part of this is also integrating CI for embedded targets, especially
|
Are you sure it's "last resort"? IME nearly all embedded code is built with |
@whitequark sorry, "last resort" wasn't a very descriptive phrase. It was meant as a "last resort for someone trying to reduce their code size due to going over their target size limit when using In context, we were talking about making a regression test that would gate Rust releases if the size increased dramatically for embedded targets. Initially we were planning to use a |
the rust-std component only contains the core and compiler-builtins (+c +mem) crates cc #49382
PR #49563 build rust-std for ARM Cortex-M. |
add a dist builder to build rust-std components for the THUMB targets the rust-std component only contains the core and compiler-builtins (+c +mem) crates cc rust-lang#49382 - I'm not entirely sure if this PR alone will produce rust-std components installable by rustup or if something else needs to be changed - I could have done the THUMB builds in an existing builder / image; I wasn't sure if that was a good idea so I added a new image - I could build other crates like alloc into the rust-std component but, AFAICT, that would require calling Cargo a second time (one for alloc and one for compiler-builtins), or have alloc depend on compiler-builtins (rust-lang#49503 will perform that change) *and* have alloc resurface the "c" and "mem" Cargo features. r? @alexcrichton
add a dist builder to build rust-std components for the THUMB targets the rust-std component only contains the core and compiler-builtins (+c +mem) crates cc rust-lang#49382 - I'm not entirely sure if this PR alone will produce rust-std components installable by rustup or if something else needs to be changed - I could have done the THUMB builds in an existing builder / image; I wasn't sure if that was a good idea so I added a new image - I could build other crates like alloc into the rust-std component but, AFAICT, that would require calling Cargo a second time (one for alloc and one for compiler-builtins), or have alloc depend on compiler-builtins (rust-lang#49503 will perform that change) *and* have alloc resurface the "c" and "mem" Cargo features. r? @alexcrichton
This has been done for the thumb targets and there's an open PR for msp430 so I'm going to close this issue in favor of that open PR. |
The PR is #51250 |
This is a P-high embedded-WG issue that needs to be fixed to make embedded Rust work on stable.
Targets like
thumbv7m-none-eabi
need to use Xargo, which requires nightly, because there's nopre-compiled
core
crate (i.e.rustup target add thumbv7m-none-eabi
doesn't work).To fastest way to remove this nightly dependency is to provide a
rust-std
component (pre-compiledcore) for the embedded targets. Then users would be able to use
rustup target thumbv7m-none-eabi; cargo build --target thumbv7m-none-eabi
for embedded development.The embedded targets
rustc
currently supports are:thumbv6m-none-eabi
thumbv7m-none-eabi
thumbv7em-none-eabi
thumbv7em-none-eabihf
msp430-none-elf
The Thumb targets have a more stable LLVM backend so we can commit to always building
core
forthat target. The MSP430 backend is slightly less stable so we don't want to block the PR pipeline if
building
core
for the MSP430 target breaks.This issue can be split in two parts:
rust-std
builds for the 4 Thumb targets. Gating oncore
building for those targets.core
/std
build fail, and enablerust-std
builds for theMSP430 target. We won't gate on
core
building for the MSP430 target.cc @alexcrichton who can give more info about how to implement this
cc @pftbest
The text was updated successfully, but these errors were encountered: