File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : docs.rs build
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ docs :
7+ name : docs.rs build
8+ runs-on : ubuntu-latest
9+ # Same image docs.rs uses, so missing system libraries surface here first.
10+ container :
11+ image : ghcr.io/rust-lang/crates-build-env/linux:latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ - name : Install nightly toolchain
15+ run : |
16+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly --profile minimal
17+ echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
18+ - name : Install cargo-docs-rs
19+ run : cargo install --locked cargo-docs-rs
20+ - name : Build docs the way docs.rs does
21+ run : cargo +nightly docs-rs -p libwebauthn
Original file line number Diff line number Diff line change @@ -19,6 +19,14 @@ resolver = "2"
1919name = " libwebauthn"
2020path = " src/lib.rs"
2121
22+ # docs.rs builds with default features only, which omits the NFC transport and
23+ # the virtual-device test surface. Document those too. libnfc is not available
24+ # in the docs.rs build environment, so the libnfc backend is left out and NFC is
25+ # documented through the pcsc backend instead.
26+ [package .metadata .docs .rs ]
27+ features = [" nfc-backend-pcsc" , " virt" ]
28+ rustdoc-args = [" --cfg" , " docsrs" ]
29+
2230[features ]
2331default = []
2432nfc = [" apdu-core" , " apdu" ]
You can’t perform that action at this time.
0 commit comments