From 253e2517eb63f4e342a2eb6d1ea0b1a0fc13bba3 Mon Sep 17 00:00:00 2001 From: thunderbiscuit Date: Tue, 27 Jan 2026 17:07:54 -0500 Subject: [PATCH] docs: enable building rust API docs --- bdk-ffi/deploy-docs.sh | 10 ++++++++++ bdk-ffi/justfile | 7 +++++++ bdk-ffi/src/lib.rs | 24 ++++++++++++------------ 3 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 bdk-ffi/deploy-docs.sh diff --git a/bdk-ffi/deploy-docs.sh b/bdk-ffi/deploy-docs.sh new file mode 100644 index 00000000..a5e3859f --- /dev/null +++ b/bdk-ffi/deploy-docs.sh @@ -0,0 +1,10 @@ +set -euo pipefail + +just docs +cd ./target/doc/ +git init . +git switch --create gh-pages +git add . +git commit --message "Deploy $(date +"%Y-%m-%d")" +git remote add upstream git@github.com:bitcoindevkit/bdk-ffi.git +git push upstream gh-pages --force diff --git a/bdk-ffi/justfile b/bdk-ffi/justfile index 62cbde6a..701658f6 100644 --- a/bdk-ffi/justfile +++ b/bdk-ffi/justfile @@ -13,3 +13,10 @@ check: test: cargo test + +# Build API documentation for gh-pages +docs: + cargo doc --no-deps + echo '' > target/doc/index.html + @echo "Documentation built at target/doc/" + @echo "Push the contents of target/doc/ to gh-pages" diff --git a/bdk-ffi/src/lib.rs b/bdk-ffi/src/lib.rs index 1693ff35..0d319d66 100644 --- a/bdk-ffi/src/lib.rs +++ b/bdk-ffi/src/lib.rs @@ -1,15 +1,15 @@ -mod bitcoin; -mod descriptor; -mod electrum; -mod error; -mod esplora; -mod keys; -mod kyoto; -mod macros; -mod store; -mod tx_builder; -mod types; -mod wallet; +pub mod bitcoin; +pub mod descriptor; +pub mod electrum; +pub mod error; +pub mod esplora; +pub mod keys; +pub mod kyoto; +pub mod macros; +pub mod store; +pub mod tx_builder; +pub mod types; +pub mod wallet; #[cfg(test)] mod tests;