Skip to content

Commit

Permalink
embed Rust docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy committed Dec 4, 2023
1 parent 7301ce7 commit c372f09
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
10 changes: 9 additions & 1 deletion catalyst-gateway/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ build-hosted:
# Build the service
FROM +builder

RUN /scripts/std_build.sh
DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+BUILD

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+SMOKE_TEST --bin=cat-gateway

Expand All @@ -39,6 +39,14 @@ build-hosted:
build-all-hosts:
BUILD --platform=linux/amd64 --platform=linux/arm64 +build-hosted

build-docs:
# Build the service
FROM +builder

RUN RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly docs

SAVE ARTIFACT target/$TARGETARCH/doc doc

## -----------------------------------------------------------------------------
##
## Standard CI targets.
Expand Down
2 changes: 1 addition & 1 deletion docs/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ src:
# Now copy into that any artifacts we pull from the builds.
COPY --dir ../+repo-docs/repo /docs/includes
# copy Rust docs
COPY ./../catalyst-gateway+build-hosted/doc /docs/src/rust
COPY ./../catalyst-gateway+build-docs/doc /docs/src/api/catalyst-gateway/rust-docs

# Build the docs here.
docs:
Expand Down
7 changes: 6 additions & 1 deletion docs/src/api/catalyst-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
icon: material/gate
---

# Catalyst Gateway Rust docs
# Catalyst Gateway Rust docs

<!-- markdownlint-disable no-inline-html -->
<iframe src="rust-docs/index.html" title="RUSTDOC Documentation" style="height:800px;width:100%;"></iframe>

[OPEN FULL PAGE](./catalyst-gateway/rust-docs/index.html)

0 comments on commit c372f09

Please sign in to comment.