Skip to content

Commit

Permalink
sys: Add stdio_coap
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Feb 20, 2023
1 parent 1472a76 commit 85f8a41
Show file tree
Hide file tree
Showing 10 changed files with 1,272 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
# Cargo.toml, copy this file over, or just use the released versions.

[patch.crates-io]
riot-sys = { git = "https://github.com/RIOT-OS/rust-riot-sys" }
riot-wrappers = { git = "https://github.com/RIOT-OS/rust-riot-wrappers" }
riot-sys = { git = "https://github.com/RIOT-OS/rust-riot-sys", branch = "marker-for-config-auto-init-enable-debug" }
riot-wrappers = { git = "https://github.com/RIOT-OS/rust-riot-wrappers", branch = "auto-init" }
3 changes: 3 additions & 0 deletions makefiles/cargo-targets.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ endif
ifneq (,$(filter shell_democommands,$(USEMODULE)))
CARGO_OPTIONS += --features rust_riotmodules/riot-module-shell-democommands
endif
ifneq (,$(filter stdio_coap,$(USEMODULE)))
CARGO_OPTIONS += --features rust_riotmodules/riot-module-stdio-coap
endif

# This is duplicating the compile-commands rule because unlike in the use case
# when a $(RIOTBASE)/compile_commands.json is built, we *want* this to be
Expand Down
18 changes: 18 additions & 0 deletions makefiles/stdio.inc.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
STDIO_MODULES = \
slipdev_stdio \
stdio_cdc_acm \
stdio_coap \
stdio_ethos \
stdio_native \
stdio_nimble \
Expand All @@ -25,6 +26,23 @@ ifneq (,$(filter stdio_cdc_acm,$(USEMODULE)))
USEMODULE += stdio_available
endif

ifneq (,$(filter stdio_coap,$(USEMODULE)))
# FIXME: Does this obsolete the stdio_coap Makefile.{dep,include}?
USEMODULE += rust_riotmodules
PSEUDOMODULES += stdio_coap

# FIXME: Whose responsibility is it to include these?

# either
USEMODULE += netdev_default
#USEMODULE += usbus_cdc_ecm

USEMODULE += gnrc_sock_udp
USEMODULE += gcoap
USEMODULE += gnrc_ipv6_default
USEMODULE += auto_init_gnrc_netif
endif

ifneq (,$(filter stdio_tinyusb_cdc_acm,$(USEMODULE)))
USEPKG += tinyusb
endif
Expand Down
1 change: 1 addition & 0 deletions sys/rust_riotmodules/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ publish = false

riot-module-lsm303agr = { path = "../../drivers/lsm303agr", optional = true }
riot-module-shell-democommands = { path = "../../sys/shell/democommands", optional = true }
riot-module-stdio-coap = { path = "../../sys/stdio_coap", optional = true }
3 changes: 3 additions & 0 deletions sys/rust_riotmodules/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ pub use riot_module_lsm303agr as lsm303agr;

#[cfg(feature = "riot-module-shell-democommands")]
pub use riot_module_shell_democommands as democommands;

#[cfg(feature = "riot-module-stdio-coap")]
pub use riot_module_stdio_coap as stdio_coap;
22 changes: 11 additions & 11 deletions sys/rust_riotmodules_standalone/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 85f8a41

Please sign in to comment.