Skip to content

Commit

Permalink
docs(riot-rs): show the thread module in docs
Browse files Browse the repository at this point in the history
Fixes #230
  • Loading branch information
ROMemories authored and kaspar030 committed Apr 11, 2024
1 parent 687d5b5 commit acbdc3f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- name: Build rustdoc docs
run: |
cargo doc -p riot-rs --features no-boards,bench
cargo doc -p riot-rs --features no-boards,bench,threading
echo "<meta http-equiv=\"refresh\" content=\"0; url=riot_rs\">" > target/doc/index.html
mkdir -p ./_site/dev/docs/api && mv target/doc/* ./_site/dev/docs/api
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,8 @@ jobs:
with:
args: --verbose --locked --features no-boards -p riot-rs -p riot-rs-boards -p riot-rs-buildinfo -p riot-rs-chips -p riot-rs-debug -p riot-rs-embassy -p riot-rs-macros -p riot-rs-rt -p riot-rs-utils

# TODO: we'll eventually want to enable relevant features
- name: "rustdoc"
run: cargo rustdoc -p riot-rs --features no-boards,bench -- -D warnings
run: cargo rustdoc -p riot-rs --features no-boards,bench,threading -- -D warnings

- name: rustfmt
run: cargo fmt --check --all
Expand Down
10 changes: 4 additions & 6 deletions src/riot-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
//! # Cargo features
#![doc = document_features::document_features!(feature_label = r#"<span class="stab portability"><code>{feature}</code></span>"#)]
#![no_std]
#![feature(doc_cfg)]
#![feature(doc_auto_cfg)]

#[cfg(feature = "bench")]
#[doc(cfg(feature = "bench"))]
#[doc(inline)]
pub use riot_rs_bench as bench;
#[doc(inline)]
Expand All @@ -20,18 +19,17 @@ pub use riot_rs_embassy as embassy;
pub use riot_rs_embassy::{define_peripherals, group_peripherals};
#[doc(inline)]
pub use riot_rs_rt as rt;
#[cfg(feature = "threading")]
#[doc(inline)]
pub use riot_rs_threads as thread;

// Attribute macros
pub use riot_rs_macros::config;
pub use riot_rs_macros::spawner;
pub use riot_rs_macros::task;
#[cfg(any(feature = "threading", doc))]
#[doc(cfg(feature = "threading"))]
pub use riot_rs_macros::thread;

#[cfg(feature = "threading")]
pub use riot_rs_threads as thread;

// These are used by proc-macros we provide
pub use linkme;
pub use static_cell;
Expand Down

0 comments on commit acbdc3f

Please sign in to comment.