Skip to content

Commit

Permalink
refactor: pull out ariel_os::buildinfo into separate crate
Browse files Browse the repository at this point in the history
This enables ariel-os-* crates to use the module.
  • Loading branch information
chrysn committed Dec 11, 2024
1 parent bfa6993 commit c1d35ef
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ members = [
"src/ariel-os-boards",
"src/ariel-os-boards/nrf52",
"src/ariel-os-boards/nrf52840dk",
"src/ariel-os-buildinfo",
"src/ariel-os-chips",
"src/ariel-os-coap",
"src/ariel-os-debug",
Expand Down Expand Up @@ -93,6 +94,7 @@ linkme = { version = "0.3.21", features = ["used_linker"] }
ariel-os = { path = "src/ariel-os", default-features = false }
ariel-os-bench = { path = "src/ariel-os-bench", default-features = false }
ariel-os-boards = { path = "src/ariel-os-boards", default-features = false }
ariel-os-buildinfo = { path = "src/ariel-os-buildinfo", default-features = false }
ariel-os-coap = { path = "src/ariel-os-coap", default-features = false }
ariel-os-debug = { path = "src/ariel-os-debug", default-features = false }
ariel-os-embassy = { path = "src/ariel-os-embassy", default-features = false }
Expand Down
12 changes: 12 additions & 0 deletions src/ariel-os-buildinfo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "ariel-os-buildinfo"
version.workspace = true
license.workspace = true
edition.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies]
ariel-os-utils = { workspace = true }
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//! Exposes information about the build.
#![no_std]
#![deny(missing_docs)]
#![deny(clippy::pedantic)]

/// The board name.
///
Expand Down
2 changes: 1 addition & 1 deletion src/ariel-os/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ document-features = { workspace = true }
linkme = { workspace = true }
ariel-os-bench = { workspace = true, optional = true }
ariel-os-boards = { path = "../ariel-os-boards" }
ariel-os-buildinfo = { workspace = true }
ariel-os-coap = { path = "../ariel-os-coap", optional = true }
ariel-os-debug = { workspace = true }
ariel-os-embassy = { path = "../ariel-os-embassy" }
Expand All @@ -21,7 +22,6 @@ ariel-os-random = { workspace = true, optional = true }
ariel-os-rt = { path = "../ariel-os-rt" }
ariel-os-storage = { workspace = true, optional = true }
ariel-os-threads = { path = "../ariel-os-threads", optional = true }
ariel-os-utils = { workspace = true }
static_cell = { workspace = true }

[features]
Expand Down
4 changes: 2 additions & 2 deletions src/ariel-os/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
#![no_std]
#![feature(doc_auto_cfg)]

pub mod buildinfo;

#[cfg(feature = "bench")]
#[doc(inline)]
pub use ariel_os_bench as bench;
#[doc(inline)]
pub use ariel_os_buildinfo as buildinfo;
#[cfg(feature = "coap")]
#[doc(inline)]
pub use ariel_os_coap as coap;
Expand Down

0 comments on commit c1d35ef

Please sign in to comment.