1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #17761 from chrysn-pull-requests/riot-updates

{examples,tests}/rust: Rust updates (-sys/-wrappers version, stable)
This commit is contained in:
chrysn 2022-03-08 23:32:56 +01:00 committed by GitHub
commit d3e1a1ac9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 30 additions and 4 deletions

View File

@ -84,10 +84,20 @@ Toolchain {#toolchain}
To install the necessary Rust components, it is easiest use [**rustup**, installed as described on its website].
Using Rust on RIOT requires a nightly version of Rust,
Using most of Rust on RIOT requires a nightly version of Rust,
because some transpiled expressions for RIOT make use of unstable features,
and because the RIOT wrappers use some unstable idioms.
@note
Building on stable is supported for some examples and platforms starting with Rust 1.59
(e.g., the rust-hello-world on any ARM Cortex, but not yet on native).
Try it out by adding `CARGO_CHANNEL=stable` to the project's Makefile;
where it doesn't work, rustc will complain that "`#![feature]` may not be used on the stable release channel".
@note
A stable version of Rust is not currently provided with the Docker images;
consequently, builds on stable are not tested as regularly as builds on nightly.
Make sure you have both the nightly **toolchain**
and the core library for the CPU (**target**) of your choice available:

Binary file not shown.

View File

@ -9,7 +9,7 @@ resolver = "2"
crate-type = ["staticlib"]
[dependencies]
riot-wrappers = { version = "^0.7", features = [ "with_coap_message", "with_coap_handler" ] }
riot-wrappers = { version = "^0.7.18", features = [ "set_panic_handler", "panic_handler_format", "with_coap_message", "with_coap_handler" ] }
coap-message-demos = { git = "https://gitlab.com/chrysn/coap-message-demos/", default-features = false }
coap-handler-implementations = "0.3"

View File

@ -30,6 +30,11 @@ DEVELHELP ?= 1
# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1
# Add 3k extra stack: The Rust examples take more of it than gcoap expects,
# presumably because the example use the standard library's sting formatting
# instead of one of the more optimized formatters.
CFLAGS += -DGCOAP_STACK_SIZE='(THREAD_STACKSIZE_DEFAULT+DEBUG_EXTRA_STACKSIZE+sizeof(coap_pkt_t)+1024)'
# The name of crate (as per Cargo.toml package name, but with '-' replaced with '_')
APPLICATION_RUST_MODULE = rust_gcoap
BASELIBS += $(APPLICATION_RUST_MODULE).module

View File

@ -1,11 +1,19 @@
BOARD_INSUFFICIENT_MEMORY := \
airfy-beacon \
blackpill \
bluepill \
bluepill-stm32f030c8 \
calliope-mini \
im880b \
i-nucleo-lrwan1 \
microbit \
nrf51dongle \
nrf6310 \
nucleo-f030r8 \
nucleo-f031k6 \
nucleo-f042k6 \
nucleo-f070rb \
nucleo-f072rb \
nucleo-f302r8 \
nucleo-f303k8 \
nucleo-f334r8 \
@ -22,4 +30,5 @@ BOARD_INSUFFICIENT_MEMORY := \
stm32g0316-disco \
stm32l0538-disco \
stm32mp157c-dk2 \
yunjia-nrf51822 \
#

Binary file not shown.

View File

@ -9,4 +9,5 @@ resolver = "2"
crate-type = ["staticlib"]
[dependencies]
riot-wrappers = "0.7"
# `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 }

Binary file not shown.

View File

@ -9,4 +9,5 @@ resolver = "2"
crate-type = ["staticlib"]
[dependencies]
riot-wrappers = "0.7"
# `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 }