Skip to content

Commit

Permalink
refactor(coapcore): Move coap/seccontext module into coapcore crate
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Jul 2, 2024
1 parent fad054f commit 2023c19
Show file tree
Hide file tree
Showing 8 changed files with 1,341 additions and 27 deletions.
29 changes: 21 additions & 8 deletions Cargo.lock

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

12 changes: 2 additions & 10 deletions examples/coap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ riot-rs = { path = "../../src/riot-rs", features = [
] }
riot-rs-boards = { path = "../../src/riot-rs-boards" }

coapcore.path = "../../src/lib/coapcore/"

# for the udp_nal mod
embedded-nal-async = "0.7"
# actually patched with https://github.com/smoltcp-rs/smoltcp/pull/904 but
Expand All @@ -30,21 +32,11 @@ embassy-futures = "0.1.1"
coap-message-demos = { version = "0.4.0", default-features = false }
coap-request-implementations = "0.1.0-alpha.4"
lakers = { version = "0.6.0", default-features = false }
lakers-crypto-rustcrypto = "0.6.0"
coap-handler = "0.2.0"
coap-message-utils = "0.3.3"
coap-handler-implementations = "0.5.0"
hexlit = "0.5.5"
coap-numbers = "0.2.3"
minicbor = "0.23.0"

liboscore = { git = "https://gitlab.com/oscore/liboscore/", rev = "e7a4ecd037cbb9c7f085047fec5896f4bdc68d50" }
liboscore-msgbackend = { git = "https://gitlab.com/oscore/liboscore/", features = [
"alloc",
], rev = "e7a4ecd037cbb9c7f085047fec5896f4bdc68d50" }
coap-message-implementations = { version = "0.1.2", features = ["downcast"] }
static-alloc = "0.2.5"
arrayvec = { version = "0.7.4", default-features = false }
coap-scroll-ring-server = "0.2.0"
scroll-ring = "0.1.1"

Expand Down
11 changes: 8 additions & 3 deletions examples/coap/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ use embassy_net::udp::{PacketMetadata, UdpSocket};

// Moving work from https://github.com/embassy-rs/embassy/pull/2519 in here for the time being
mod udp_nal;
// Might warrant a standalone crate at some point
mod oluru;

mod seccontext;
use coapcore::seccontext;

// because coapcore depends on it temporarily
extern crate alloc;
use static_alloc::Bump;

#[global_allocator]
static A: Bump<[u8; 1 << 16]> = Bump::uninit();

#[riot_rs::task(autostart)]
async fn coap_run() {
Expand Down
Loading

0 comments on commit 2023c19

Please sign in to comment.