Skip to content

Commit

Permalink
generate docs.rs with features tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
toidiu committed Dec 3, 2024
1 parent bae9664 commit a919dee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,18 @@ jobs:
with:
submodules: true

- name: Install rust toolchain
id: toolchain
# nightly features are used for formatting
- name: Install rust nightly toolchain
id: nightly-toolchain
run: |
rustup toolchain install stable --profile minimal
rustup override set stable
rustup toolchain install nightly --profile minimal
- uses: camshaft/rust-cache@v1

- name: Run cargo doc
run: cargo doc --all-features --no-deps --workspace --exclude s2n-quic-qns
run: cargo +nightly doc --all-features --no-deps --workspace --exclude s2n-quic-qns
env:
RUSTDOCFLAGS: --cfg s2n_docs
RUSTDOCFLAGS: --cfg s2n_docsrs

- uses: aws-actions/[email protected]
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
Expand Down
8 changes: 8 additions & 0 deletions quic/s2n-quic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,11 @@ s2n-quic-transport = { path = "../s2n-quic-transport", features = ["unstable_res
tokio = { version = "1", features = ["full"] }
tracing = { version = "0.1" }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# Compile with the `s2n_docsrs` feature to enable feature tagging in rust docs.
#
# Docs.rs generates crates.io documentation using the nightly release of the Rust
# compiler. See documentation for additional configuration options:
# https://docs.rs/about/metadata
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "s2n_docsrs"]

0 comments on commit a919dee

Please sign in to comment.