mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
rust: Make examples / tests use any Rust RIOT modules
This commit is contained in:
parent
5e75f4bd13
commit
bc8ec6d542
@ -14,3 +14,9 @@ riot-wrappers = { version = "^0.7.18", features = [ "set_panic_handler", "panic_
|
||||
coap-message-demos = { git = "https://gitlab.com/chrysn/coap-message-demos/", default-features = false }
|
||||
coap-handler-implementations = "0.3"
|
||||
riot-coap-handler-demos = { git = "https://gitlab.com/etonomy/riot-module-examples/", features = [ "vfs" ] }
|
||||
|
||||
# While currently this exmple does not use any RIOT modules implemented in
|
||||
# Rust, that may change; it is best practice for any RIOT application that has
|
||||
# its own top-level Rust crate to include rust_riotmodules from inside
|
||||
# RIOTBASE.
|
||||
rust_riotmodules = { path = "../../sys/rust_riotmodules/" }
|
||||
|
@ -10,6 +10,8 @@ use riot_wrappers::{gcoap, thread, ztimer, gnrc};
|
||||
|
||||
use coap_handler_implementations::{ReportingHandlerBuilder, HandlerBuilder};
|
||||
|
||||
extern crate rust_riotmodules;
|
||||
|
||||
riot_main!(main);
|
||||
|
||||
fn main() {
|
||||
|
@ -11,3 +11,9 @@ crate-type = ["staticlib"]
|
||||
[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 }
|
||||
|
||||
# While currently this exmple does not use any RIOT modules implemented in
|
||||
# Rust, that may change; it is best practice for any RIOT application that has
|
||||
# its own top-level Rust crate to include rust_riotmodules from inside
|
||||
# RIOTBASE.
|
||||
rust_riotmodules = { path = "../../sys/rust_riotmodules/" }
|
||||
|
@ -8,6 +8,8 @@
|
||||
use riot_wrappers::riot_main;
|
||||
use riot_wrappers::println;
|
||||
|
||||
extern crate rust_riotmodules;
|
||||
|
||||
riot_main!(main);
|
||||
|
||||
fn main() {
|
||||
|
@ -17,3 +17,8 @@ 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 }
|
||||
|
||||
# While currently this test does not use any RIOT modules implemented in Rust,
|
||||
# that may change; it is best practice for any RIOT application that has its
|
||||
# own top-level Rust crate to include rust_riotmodules from inside RIOTBASE.
|
||||
rust_riotmodules = { path = "../../sys/rust_riotmodules/" }
|
||||
|
@ -8,6 +8,8 @@
|
||||
use riot_wrappers::riot_main;
|
||||
use riot_wrappers::println;
|
||||
|
||||
extern crate rust_riotmodules;
|
||||
|
||||
riot_main!(main);
|
||||
|
||||
fn main() {
|
||||
|
Loading…
Reference in New Issue
Block a user