Skip to content

Commit c4fbe9d

Browse files
committed
2 parents c00d342 + 0d77358 commit c4fbe9d

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,23 @@ jobs:
109109
run: cargo doc --manifest-path Cargo.toml --no-deps
110110
env:
111111
RUSTDOCFLAGS: -D warnings
112+
113+
docsrs:
114+
name: Docs (simulate docs.rs on nightly)
115+
runs-on: ubuntu-latest
116+
steps:
117+
- uses: actions/checkout@v4
118+
- name: Install Rust (nightly)
119+
uses: dtolnay/rust-toolchain@stable
120+
with:
121+
toolchain: nightly
122+
- name: Cache cargo
123+
uses: Swatinem/rust-cache@v2
124+
- name: Build docs like docs.rs
125+
env:
126+
DOCS_RS: "1"
127+
RUSTDOCFLAGS: "--cfg docsrs --cap-lints warn"
128+
run: |
129+
cargo +nightly doc --lib --no-deps \
130+
--features "smoltcp,critical-section,async,embassy-net,log,defmt"
131+

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ embassy-net-driver = { version = "0.2", optional = true }
7676
critical-section = { version = "1.2", features = ["std"] }
7777

7878
[package.metadata.docs.rs]
79+
default-target = "xtensa-esp32-none-elf"
7980
features = ["smoltcp", "critical-section", "async", "embassy-net", "log", "defmt"]
8081
rustdoc-args = ["--cfg", "docsrs"]
82+
cargo-args = ["-Z", "build-std=core"]
8183

8284
# =============================================================================
8385
# Integration Test Dependencies (only needed when building for target hardware)

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@
8383
//! With default configuration (10 RX buffers, 10 TX buffers, 1600 bytes each):
8484
//! - Total: ~32 KB of DMA-capable SRAM
8585
86+
#![no_std]
8687
#![cfg_attr(docsrs, feature(doc_cfg))]
8788
#![cfg_attr(docsrs, doc(cfg_hide(feature = "esp32p4")))]
88-
#![no_std]
8989
#![deny(missing_docs)]
9090
#![allow(unsafe_code)]
9191
#![deny(unsafe_op_in_unsafe_fn)]

0 commit comments

Comments
 (0)