소스 검색

book: Build rustdoc by default.

parazyd 3 년 전
부모
커밋
4b2fb10722
4개의 변경된 파일46개의 추가작업 그리고 6개의 파일을 삭제
  1. 12 5
      .github/workflows/book.yml
  2. 2 0
      doc/Makefile
  3. 1 1
      doc/src/SUMMARY.md
  4. 31 0
      doc/src/rustdoc/rustdoc.md

+ 12 - 5
.github/workflows/book.yml

@@ -27,23 +27,30 @@ jobs:
                 override: true
                 components: rustfmt, clippy
 
+            - name: Install Rust (wasm32)
+              uses: actions-rs/toolchain@v1
+              with:
+                toolchain: stable
+                target: wasm32-unknown-unknown
+                override: true
+
             - uses: Swatinem/rust-cache@v1
 
             - name: Install ghp-import and mdbook
               run: |
                 pip install ghp-import
                 sudo apt -y install make wget
-                wget "https://github.com/badboy/mdbook-toc/releases/download/0.10.0/mdbook-toc-0.10.0-x86_64-unknown-linux-gnu.tar.gz"
-                wget "https://github.com/lzanini/mdbook-katex/releases/download/v0.2.18/mdbook-katex-v0.2.18-x86_64-unknown-linux-gnu.tar.gz"
-                wget "https://github.com/badboy/mdbook-mermaid/releases/download/v0.12.3/mdbook-mermaid-v0.12.3-x86_64-unknown-linux-gnu.tar.gz"
-                wget "https://github.com/rust-lang/mdBook/releases/download/v0.4.22/mdbook-v0.4.22-x86_64-unknown-linux-gnu.tar.gz"
+                wget "https://github.com/badboy/mdbook-toc/releases/download/0.11.0/mdbook-toc-0.11.0-x86_64-unknown-linux-gnu.tar.gz"
+                wget "https://github.com/lzanini/mdbook-katex/releases/download/v0.3.3/mdbook-katex-v0.3.3-x86_64-unknown-linux-gnu.tar.gz"
+                wget "https://github.com/badboy/mdbook-mermaid/releases/download/v0.12.6/mdbook-mermaid-v0.12.6-x86_64-unknown-linux-gnu.tar.gz"
+                wget "https://github.com/rust-lang/mdBook/releases/download/v0.4.25/mdbook-v0.4.25-x86_64-unknown-linux-gnu.tar.gz"
                 for i in *.tar.gz; do
                     tar xf "$i"
                     rm -f "$i"
                 done
                 mv -v mdbook* /usr/local/bin/
 
-            - name: Compile and publish the book
+            - name: Compile and publish the book and rustdoc
               run: |
                 git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
                 git config --local user.name "parazyd"

+ 2 - 0
doc/Makefile

@@ -12,6 +12,8 @@ JSONRPC = \
 all: $(JSONRPC)
 	mdbook build
 	cp -f theme/logo* book/html/
+	$(MAKE) -C ../ rustdoc
+	cp -r ../target/doc/* book/html/rustdoc/
 
 $(DARKFID_JSONRPC):
 	@echo "# darkfid JSON-RPC API" > $@

+ 1 - 1
doc/src/SUMMARY.md

@@ -66,4 +66,4 @@
     - [Network Protocol](misc/event_graph/network_protocol.md)
   - [darkwiki](misc/darkwiki.md)
   - [dnetview](misc/dnetview.md)
-
+- [Rustdoc](rustdoc/rustdoc.md)

+ 31 - 0
doc/src/rustdoc/rustdoc.md

@@ -0,0 +1,31 @@
+rustdoc
+=======
+
+Here the rustdoc for this repository's crates can be found.
+
+## Libraries
+
+* [`darkfi`](darkfi/index.html)
+* [`darkfi-sdk`](darkfi_sdk/index.html)
+* [`darkfi-serial`](darkfi_serial/index.html)
+* [`darkfi-derive`](darkfi_derive/index.html)
+* [`darkfi-derive-internal`](darkfi_derive_internal/index.html)
+
+## Binaries
+
+* [`darkfid`](darkfid/index.html)
+* [`drk`](drk/index.html)
+* [`faucetd`](faucetd/index.html)
+* [`fu`](fu/index.html)
+* [`fud`](fud/index.html)
+* [`ircd`](ircd/index.html)
+* [`lilith`](lilith/index.html)
+* [`tau`](tau/index.html)
+* [`taud`](taud/index.html)
+* [`vanityaddr`](vanityaddr/index.html)
+* [`zkas`](zkas/index.html)
+
+## Smart contracts
+
+* [`darkfi-money-contract`](darkfi_money_contract/index.html)
+* [`darkfi-dao-contract`](darkfi_dao_contract/index.html)