Skip to content

Commit dc7fbf2

Browse files
dannywillemsclaude
andcommitted
ci: add generate-doc-index target and use it in CI
Add a new Makefile target `generate-doc-index` for generating docs with the nightly --enable-index-page feature, and update ci.yml to use it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 089bf42 commit dc7fbf2

File tree

2 files changed

+13
-27
lines changed

2 files changed

+13
-27
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -184,32 +184,7 @@ jobs:
184184
matrix.rust_and_os.os == needs.define-matrix.outputs.default_os
185185
run: |
186186
eval $(opam env)
187-
# Note: We explicitly list features instead of using --all-features
188-
# to avoid including no-std features which conflict with std-dependent
189-
# code. See https://github.com/o1-labs/mina-rust/issues/1984
190-
FEATURES="
191-
arkworks/std,
192-
arkworks/wasm,
193-
internal-tracing/enabled,
194-
internal-tracing/ocaml_types,
195-
kimchi/bn254,
196-
kimchi/check_feature_flags,
197-
kimchi/diagnostics,
198-
kimchi/internal_tracing,
199-
kimchi/ocaml_types,
200-
kimchi/wasm_types,
201-
mina-curves/asm,
202-
mina-poseidon/ocaml_types,
203-
o1-utils/diagnostics,
204-
o1vm/open_mips,
205-
plonk_wasm/nodejs,
206-
poly-commitment/ocaml_types
207-
"
208-
# Remove whitespace from FEATURES
209-
FEATURES=$(echo "$FEATURES" | tr -d '[:space:]')
210-
RUSTDOCFLAGS="--enable-index-page -Zunstable-options" \
211-
cargo +nightly doc --features "$FEATURES" \
212-
--no-deps --workspace --exclude xtask
187+
make generate-doc-index
213188
cp -r ./target/doc ./book/book/html/rustdoc
214189
215190
- name: Deploy

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,17 @@ generate-doc: ## Generate the Rust documentation
215215
@echo "The documentation is available at: ./target/doc"
216216
@echo ""
217217

218+
generate-doc-index: ## Generate Rust docs with index page (requires nightly)
219+
@echo ""
220+
@echo "Generating the documentation with index page."
221+
@echo ""
222+
RUSTDOCFLAGS="--enable-index-page -Zunstable-options" \
223+
cargo +nightly doc --features "$(WORKSPACE_FEATURES)" \
224+
--no-deps --workspace --exclude xtask
225+
@echo ""
226+
@echo "The documentation is available at: ./target/doc"
227+
@echo ""
228+
218229
help: ## Ask for help!
219230
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
220231

@@ -284,4 +295,4 @@ build-web: ## Compile the Kimchi library into WebAssembly to be used in the brow
284295
--out-dir ${PLONK_WASM_WEB_OUTDIR} \
285296
--rust-version $(NIGHTLY_RUST_VERSION)
286297

287-
.PHONY: all setup install-test-deps clean build release test-doc test-doc-with-coverage test test-with-coverage test-heavy test-heavy-with-coverage test-all test-all-with-coverage nextest nextest-with-coverage nextest-heavy nextest-heavy-with-coverage nextest-all nextest-all-with-coverage format lint generate-test-coverage-report generate-doc setup-riscv32-toolchain help fclean build-riscv32-programs build-mips-programs check-format
298+
.PHONY: all setup install-test-deps clean build release test-doc test-doc-with-coverage test test-with-coverage test-heavy test-heavy-with-coverage test-all test-all-with-coverage nextest nextest-with-coverage nextest-heavy nextest-heavy-with-coverage nextest-all nextest-all-with-coverage format lint generate-test-coverage-report generate-doc generate-doc-index setup-riscv32-toolchain help fclean build-riscv32-programs build-mips-programs check-format

0 commit comments

Comments
 (0)