From 848a467131abc628a39f2eb1c21ac459b803a6db Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Mon, 11 Dec 2023 12:43:49 +0200 Subject: [PATCH] Add Rust docs page --- docs/Earthfile | 8 +++++--- docs/src/.pages | 5 +++++ docs/src/api/index.md | 46 +++++++++++++++++++++++++++++++++++++++++++ hermes/Earthfile | 10 +++++----- 4 files changed, 61 insertions(+), 8 deletions(-) create mode 100644 docs/src/.pages create mode 100644 docs/src/api/index.md diff --git a/docs/Earthfile b/docs/Earthfile index 681f0982e..cb24027b4 100644 --- a/docs/Earthfile +++ b/docs/Earthfile @@ -6,21 +6,23 @@ VERSION 0.7 # Copy all the source we need to build the docs src: # Common src setup - DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.0.8+SRC + DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.0.11+SRC # Now copy into that any artifacts we pull from the builds. COPY --dir ../+repo-docs/repo /docs/includes + # copy Rust docs + COPY ./../hermes+build-hosted/doc /docs/src/api/rust-docs # Build the docs here. docs: FROM +src - DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.0.8+BUILD + DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.0.11+BUILD # Make a locally runable container that can serve the docs. local: # Build a self contained service to show built docs locally. - DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.0.8+PACKAGE + DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.0.11+PACKAGE # Copy the static pages into the container COPY +docs/ /usr/share/nginx/html diff --git a/docs/src/.pages b/docs/src/.pages new file mode 100644 index 000000000..8400e4b6c --- /dev/null +++ b/docs/src/.pages @@ -0,0 +1,5 @@ +nav: + - getting-started + - 'API': api + - architecture + - appendix diff --git a/docs/src/api/index.md b/docs/src/api/index.md new file mode 100644 index 000000000..641bf301a --- /dev/null +++ b/docs/src/api/index.md @@ -0,0 +1,46 @@ +--- +icon: material/api +--- + + + +# Hermes Rust docs + + + + +[OPEN FULL PAGE](./rust-docs/index.html) + +## Workspace Dependency Graph + +```kroki-graphviz +@from_file:./api/rust-docs/workspace.dot +``` + +## External Dependencies Graph + +```kroki-graphviz +@from_file:./api/rust-docs/full.dot +``` + +## Build and Development Dependencies Graph + +```kroki-graphviz +@from_file:./api/rust-docs/all.dot +``` + +## Module trees + +### hermes crate + +```rust + {{ include_file('src/api/rust-docs/hermes.hermes.bin.modules.tree') }} +``` + +## Module graphs + +### hermes crate + +```kroki-graphviz +@from_file:./api/rust-docs/hermes.hermes.bin.modules.dot +``` diff --git a/hermes/Earthfile b/hermes/Earthfile index 51b708c6e..876d2e6ef 100644 --- a/hermes/Earthfile +++ b/hermes/Earthfile @@ -4,9 +4,9 @@ VERSION 0.7 # Set up our target toolchains, and copy our files. builder: - FROM github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+rust-base + FROM github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.11+rust-base - DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+SETUP --toolchain=rust-toolchain.toml + DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.11+SETUP --toolchain=rust-toolchain.toml COPY --dir .cargo .config Cargo.* clippy.toml deny.toml rustfmt.toml bin crates . @@ -14,7 +14,7 @@ builder: check-hosted: FROM +builder - DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+CHECK + DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.11+CHECK # Test which runs check with all supported host tooling. Needs qemu or rosetta to run. # Only used to validate tooling is working across host toolsets. @@ -27,9 +27,9 @@ build-hosted: # Build the service FROM +builder - RUN /scripts/std_build.sh + DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.11+BUILD --bins="hermes/hermes" - DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+SMOKE_TEST --bin=hermes + DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.11+SMOKE_TEST --bin=hermes SAVE ARTIFACT target/$TARGETARCH/doc doc SAVE ARTIFACT target/$TARGETARCH/release/hermes hermes