Open WataNekko opened 1 week ago
Thanks for reporting this; setting a toolchain should work in docker -- for "should" as in "it'd be good if", not as in "it worked before" (I never tested it).
That aside, the panic mode needs to be set to "abort" on native to avoid the need for a nightly. Mind you that a panic is aborting the current thread in RIOT anyway for lack of unwinding, and due to how the panic handlers in riot-wrappers are implemented. Setting panic=abort merely also tells the compiler that there is really no unwinding going on, possibly allowing some more optimizations and avoiding the need for a nightly-only eh_personality, so there is nothing gained by leaving panic on its default value except brevity of the Cargo.toml.
Thanks for your response. Okay, I’m now clear about setting panic is recommended. But if I were to use some nightly features and build with docker, how should I go about setting the toolchain for the docker image? I assume it would be best to configure this somewhere in the riot/riotbuild
image upstream.
Description
Building Rust examples on native with docker (BUILD_IN_DOCKER=1) without
[profile.release] panic = "abort"
fails withSeems like the
riot/riotbuild
docker image is not using nightly toolchain. Forcing nightly withrust-toolchain.toml
Gives
Is nightly not supported in docker and I have to add
panic = "abort"
as a workaround? (Rust examples here works fine. I was trying to run https://gitlab.com/etonomy/riot-module-examples cc @chrysn)