From 31e3e1bbfc488a9954aa87c8d263e8e42d8f98dd Mon Sep 17 00:00:00 2001 From: chrysn Date: Mon, 14 Mar 2022 15:12:37 +0100 Subject: [PATCH] tests/rust: Run minimal test on stable Rust --- tests/rust_minimal/Cargo.toml | 6 ++++++ tests/rust_minimal/Makefile | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/tests/rust_minimal/Cargo.toml b/tests/rust_minimal/Cargo.toml index 739e38879b..128a03eb9f 100644 --- a/tests/rust_minimal/Cargo.toml +++ b/tests/rust_minimal/Cargo.toml @@ -8,6 +8,12 @@ resolver = "2" [lib] crate-type = ["staticlib"] +[profile.release] +# Setting the panic mode has little effect on the built code (as Rust on RIOT +# supports no unwinding), but setting it allows builds on native without using +# the nightly-only lang_items feature. +panic = "abort" + [dependencies] # `default-features = false` can be removed with 0.8, and enables building on stable during the 0.7 series riot-wrappers = { version = "0.7", features = [ "set_panic_handler" ], default-features = false } diff --git a/tests/rust_minimal/Makefile b/tests/rust_minimal/Makefile index 9001f83c6c..0f91d760be 100644 --- a/tests/rust_minimal/Makefile +++ b/tests/rust_minimal/Makefile @@ -5,6 +5,11 @@ BASELIBS += $(APPLICATION_RUST_MODULE).module FEATURES_REQUIRED += rust_target +# This example can, on all platforms, be built with a stable version of Rust. +# For most advanced features (eg. when using CoAP, SAUL or the shell with +# Rust), this needs to be set to "nightly" for the time being. +CARGO_CHANNEL = stable + # Currently unknown, something related to the LED_PORT definition that doesn't # pass C2Rust's transpilation BOARD_BLACKLIST := ek-lm4f120xl