From ee43f3787083ca41d9be2b12d929b854d43a79a0 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 10 Feb 2026 09:57:10 +0100 Subject: [PATCH] Add documentation links and deployment effect - Add API documentation links to all Cargo.toml files - Add API documentation links to all crate READMEs - Add API Reference link to main README - Add Hercules CI effect to push docs to gh-pages on main branch --- README.md | 1 + dev/flake-module.nix | 18 +++++++++++++++++- nix-bindings-bdwgc-sys/Cargo.toml | 1 + nix-bindings-bdwgc-sys/README.md | 2 ++ nix-bindings-expr-sys/Cargo.toml | 1 + nix-bindings-expr-sys/README.md | 2 ++ nix-bindings-expr/Cargo.toml | 1 + nix-bindings-expr/README.md | 2 ++ nix-bindings-fetchers-sys/Cargo.toml | 1 + nix-bindings-fetchers-sys/README.md | 2 ++ nix-bindings-fetchers/Cargo.toml | 1 + nix-bindings-fetchers/README.md | 2 ++ nix-bindings-flake-sys/Cargo.toml | 1 + nix-bindings-flake-sys/README.md | 2 ++ nix-bindings-flake/Cargo.toml | 1 + nix-bindings-flake/README.md | 2 ++ nix-bindings-store-sys/Cargo.toml | 1 + nix-bindings-store-sys/README.md | 2 ++ nix-bindings-store/Cargo.toml | 1 + nix-bindings-store/README.md | 2 ++ nix-bindings-util-sys/Cargo.toml | 1 + nix-bindings-util-sys/README.md | 2 ++ nix-bindings-util/Cargo.toml | 1 + nix-bindings-util/README.md | 2 ++ 24 files changed, 51 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ad6f2ac..e02b585 100644 --- a/README.md +++ b/README.md @@ -211,6 +211,7 @@ For VSCode, load the dev shell via Nix Env Selector extension or direnv. ## Documentation +- [API Reference](https://nixops4.github.io/nix-bindings-rust/development/) - [Changelog](CHANGELOG.md) - [Nix C API Reference][C API] - [nix-cargo-integration][nix-cargo-integration] diff --git a/dev/flake-module.nix b/dev/flake-module.nix index 449a560..4ca895a 100644 --- a/dev/flake-module.nix +++ b/dev/flake-module.nix @@ -1,5 +1,6 @@ { inputs, + withSystem, ... }: { @@ -218,9 +219,24 @@ }; }; herculesCI = - { ... }: + hci@{ lib, ... }: { ciSystems = [ "x86_64-linux" ]; + onPush.default.outputs = { + effects.pushDocs = lib.optionalAttrs (hci.config.repo.branch == "main") ( + withSystem "x86_64-linux" ( + { config, hci-effects, ... }: + hci-effects.gitWriteBranch { + git.checkout.remote.url = hci.config.repo.remoteHttpUrl; + git.checkout.forgeType = "github"; + git.checkout.user = "x-access-token"; + git.update.branch = "gh-pages"; + contents = config.packages.docs; + destination = "development"; # directory + } + ) + ); + }; }; hercules-ci.flake-update = { enable = true; diff --git a/nix-bindings-bdwgc-sys/Cargo.toml b/nix-bindings-bdwgc-sys/Cargo.toml index 734663e..488f41e 100644 --- a/nix-bindings-bdwgc-sys/Cargo.toml +++ b/nix-bindings-bdwgc-sys/Cargo.toml @@ -6,6 +6,7 @@ build = "build.rs" license = "LGPL-2.1" description = "Low-level FFI bindings to the Boehm-Demers-Weiser garbage collector" repository = "https://github.com/nixops4/nix-bindings-rust" +documentation = "https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_bdwgc_sys/" readme = "README.md" [lib] diff --git a/nix-bindings-bdwgc-sys/README.md b/nix-bindings-bdwgc-sys/README.md index 80988a5..b49b5b4 100644 --- a/nix-bindings-bdwgc-sys/README.md +++ b/nix-bindings-bdwgc-sys/README.md @@ -3,6 +3,8 @@ This crate contains generated bindings for the Boehm-Demers-Weiser garbage collector (`bdw-gc`). **You should not have to use this crate directly,** and so you should probably not add it to your dependencies. +[API Documentation](https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_bdwgc_sys/) + ## Changelog See the [nix-bindings-rust changelog](https://github.com/nixops4/nix-bindings-rust/blob/main/CHANGELOG.md). diff --git a/nix-bindings-expr-sys/Cargo.toml b/nix-bindings-expr-sys/Cargo.toml index 4f8e373..0cf3e12 100644 --- a/nix-bindings-expr-sys/Cargo.toml +++ b/nix-bindings-expr-sys/Cargo.toml @@ -6,6 +6,7 @@ build = "build.rs" license = "LGPL-2.1" description = "Low-level FFI bindings to the Nix expression evaluator" repository = "https://github.com/nixops4/nix-bindings-rust" +documentation = "https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_expr_sys/" readme = "README.md" [lib] diff --git a/nix-bindings-expr-sys/README.md b/nix-bindings-expr-sys/README.md index 906f366..9fdb3a0 100644 --- a/nix-bindings-expr-sys/README.md +++ b/nix-bindings-expr-sys/README.md @@ -4,6 +4,8 @@ This crate contains generated bindings for the Nix C API (`nix-expr-c`). **You should not have to use this crate directly,** and so you should probably not add it to your dependencies. Instead, use the `nix-bindings-expr` crate, which _should_ be sufficient. +[API Documentation](https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_expr_sys/) + ## Changelog See the [nix-bindings-rust changelog](https://github.com/nixops4/nix-bindings-rust/blob/main/CHANGELOG.md). diff --git a/nix-bindings-expr/Cargo.toml b/nix-bindings-expr/Cargo.toml index 4b1c777..ef9a373 100644 --- a/nix-bindings-expr/Cargo.toml +++ b/nix-bindings-expr/Cargo.toml @@ -6,6 +6,7 @@ build = "build.rs" license = "LGPL-2.1" description = "Rust bindings to Nix expression evaluator" repository = "https://github.com/nixops4/nix-bindings-rust" +documentation = "https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_expr/" readme = "README.md" [lib] diff --git a/nix-bindings-expr/README.md b/nix-bindings-expr/README.md index ebd889a..cb92996 100644 --- a/nix-bindings-expr/README.md +++ b/nix-bindings-expr/README.md @@ -2,6 +2,8 @@ Rust bindings to the Nix expression evaluator. +[API Documentation](https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_expr/) + ## Changelog See the [nix-bindings-rust changelog](https://github.com/nixops4/nix-bindings-rust/blob/main/CHANGELOG.md). diff --git a/nix-bindings-fetchers-sys/Cargo.toml b/nix-bindings-fetchers-sys/Cargo.toml index 99ff741..2dfaa3b 100644 --- a/nix-bindings-fetchers-sys/Cargo.toml +++ b/nix-bindings-fetchers-sys/Cargo.toml @@ -6,6 +6,7 @@ build = "build.rs" license = "LGPL-2.1" description = "Low-level FFI bindings to the nix-fetchers library" repository = "https://github.com/nixops4/nix-bindings-rust" +documentation = "https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_fetchers_sys/" readme = "README.md" [lib] diff --git a/nix-bindings-fetchers-sys/README.md b/nix-bindings-fetchers-sys/README.md index 87113b6..8230b81 100644 --- a/nix-bindings-fetchers-sys/README.md +++ b/nix-bindings-fetchers-sys/README.md @@ -4,6 +4,8 @@ This crate contains generated bindings for the Nix C API (`nix-fetchers-c`). **You should not have to use this crate directly,** and so you should probably not add it to your dependencies. Instead, use the `nix-bindings-fetchers` crate, which _should_ be sufficient. +[API Documentation](https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_fetchers_sys/) + ## Changelog See the [nix-bindings-rust changelog](https://github.com/nixops4/nix-bindings-rust/blob/main/CHANGELOG.md). diff --git a/nix-bindings-fetchers/Cargo.toml b/nix-bindings-fetchers/Cargo.toml index e0d06cb..4ae993d 100644 --- a/nix-bindings-fetchers/Cargo.toml +++ b/nix-bindings-fetchers/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" license = "LGPL-2.1" description = "Rust bindings to Nix fetchers" repository = "https://github.com/nixops4/nix-bindings-rust" +documentation = "https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_fetchers/" readme = "README.md" [lib] diff --git a/nix-bindings-fetchers/README.md b/nix-bindings-fetchers/README.md index 6d23b13..b8f3941 100644 --- a/nix-bindings-fetchers/README.md +++ b/nix-bindings-fetchers/README.md @@ -2,6 +2,8 @@ Rust bindings to the nix-fetchers library. +[API Documentation](https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_fetchers/) + ## Changelog See the [nix-bindings-rust changelog](https://github.com/nixops4/nix-bindings-rust/blob/main/CHANGELOG.md). diff --git a/nix-bindings-flake-sys/Cargo.toml b/nix-bindings-flake-sys/Cargo.toml index fe83419..987cd6d 100644 --- a/nix-bindings-flake-sys/Cargo.toml +++ b/nix-bindings-flake-sys/Cargo.toml @@ -6,6 +6,7 @@ build = "build.rs" license = "LGPL-2.1" description = "Low-level FFI bindings to Nix flakes" repository = "https://github.com/nixops4/nix-bindings-rust" +documentation = "https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_flake_sys/" readme = "README.md" [lib] diff --git a/nix-bindings-flake-sys/README.md b/nix-bindings-flake-sys/README.md index 84114d7..1d26c8d 100644 --- a/nix-bindings-flake-sys/README.md +++ b/nix-bindings-flake-sys/README.md @@ -4,6 +4,8 @@ This crate contains generated bindings for the Nix C API (`nix-flake-c`). **You should not have to use this crate directly,** and so you should probably not add it to your dependencies. Instead, use the `nix-bindings-flake` crate, which _should_ be sufficient. +[API Documentation](https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_flake_sys/) + ## Changelog See the [nix-bindings-rust changelog](https://github.com/nixops4/nix-bindings-rust/blob/main/CHANGELOG.md). diff --git a/nix-bindings-flake/Cargo.toml b/nix-bindings-flake/Cargo.toml index 336b1f8..5fbb42a 100644 --- a/nix-bindings-flake/Cargo.toml +++ b/nix-bindings-flake/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" license = "LGPL-2.1" description = "Rust bindings to Nix flakes" repository = "https://github.com/nixops4/nix-bindings-rust" +documentation = "https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_flake/" readme = "README.md" [lib] diff --git a/nix-bindings-flake/README.md b/nix-bindings-flake/README.md index 6fda25d..43dd11b 100644 --- a/nix-bindings-flake/README.md +++ b/nix-bindings-flake/README.md @@ -2,6 +2,8 @@ Rust bindings to Nix flakes. +[API Documentation](https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_flake/) + ## Changelog See the [nix-bindings-rust changelog](https://github.com/nixops4/nix-bindings-rust/blob/main/CHANGELOG.md). diff --git a/nix-bindings-store-sys/Cargo.toml b/nix-bindings-store-sys/Cargo.toml index f9f5ee2..9e8c374 100644 --- a/nix-bindings-store-sys/Cargo.toml +++ b/nix-bindings-store-sys/Cargo.toml @@ -6,6 +6,7 @@ build = "build.rs" license = "LGPL-2.1" description = "Low-level FFI bindings to the Nix store library" repository = "https://github.com/nixops4/nix-bindings-rust" +documentation = "https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_store_sys/" readme = "README.md" [lib] diff --git a/nix-bindings-store-sys/README.md b/nix-bindings-store-sys/README.md index 31a2d7e..936505d 100644 --- a/nix-bindings-store-sys/README.md +++ b/nix-bindings-store-sys/README.md @@ -4,6 +4,8 @@ This crate contains generated bindings for the Nix C API (`nix-store-c`). **You should not have to use this crate directly,** and so you should probably not add it to your dependencies. Instead, use the `nix-bindings-store` crate, which _should_ be sufficient. +[API Documentation](https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_store_sys/) + ## Changelog See the [nix-bindings-rust changelog](https://github.com/nixops4/nix-bindings-rust/blob/main/CHANGELOG.md). diff --git a/nix-bindings-store/Cargo.toml b/nix-bindings-store/Cargo.toml index 83aab99..24336db 100644 --- a/nix-bindings-store/Cargo.toml +++ b/nix-bindings-store/Cargo.toml @@ -6,6 +6,7 @@ build = "build.rs" license = "LGPL-2.1" description = "Rust bindings to Nix store library" repository = "https://github.com/nixops4/nix-bindings-rust" +documentation = "https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_store/" readme = "README.md" [lib] diff --git a/nix-bindings-store/README.md b/nix-bindings-store/README.md index 1df35eb..8002364 100644 --- a/nix-bindings-store/README.md +++ b/nix-bindings-store/README.md @@ -2,6 +2,8 @@ Rust bindings to the Nix store library. +[API Documentation](https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_store/) + ## Changelog See the [nix-bindings-rust changelog](https://github.com/nixops4/nix-bindings-rust/blob/main/CHANGELOG.md). diff --git a/nix-bindings-util-sys/Cargo.toml b/nix-bindings-util-sys/Cargo.toml index 7a0d01c..2441074 100644 --- a/nix-bindings-util-sys/Cargo.toml +++ b/nix-bindings-util-sys/Cargo.toml @@ -6,6 +6,7 @@ build = "build.rs" license = "LGPL-2.1" description = "Low-level FFI bindings to Nix utility library" repository = "https://github.com/nixops4/nix-bindings-rust" +documentation = "https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_util_sys/" readme = "README.md" [lib] diff --git a/nix-bindings-util-sys/README.md b/nix-bindings-util-sys/README.md index 7e762d5..b504cb8 100644 --- a/nix-bindings-util-sys/README.md +++ b/nix-bindings-util-sys/README.md @@ -4,6 +4,8 @@ This crate contains generated bindings for the Nix C API (`nix-util-c`). **You should not have to use this crate directly,** and so you should probably not add it to your dependencies. Instead, use the `nix-bindings-util` crate, which _should_ be sufficient. +[API Documentation](https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_util_sys/) + ## Changelog See the [nix-bindings-rust changelog](https://github.com/nixops4/nix-bindings-rust/blob/main/CHANGELOG.md). diff --git a/nix-bindings-util/Cargo.toml b/nix-bindings-util/Cargo.toml index 6a32fb1..78e8353 100644 --- a/nix-bindings-util/Cargo.toml +++ b/nix-bindings-util/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" license = "LGPL-2.1" description = "Rust bindings to Nix utility library" repository = "https://github.com/nixops4/nix-bindings-rust" +documentation = "https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_util/" readme = "README.md" [lib] diff --git a/nix-bindings-util/README.md b/nix-bindings-util/README.md index 895b7cf..0a29f29 100644 --- a/nix-bindings-util/README.md +++ b/nix-bindings-util/README.md @@ -2,6 +2,8 @@ Rust bindings to the Nix utility library. +[API Documentation](https://nixops4.github.io/nix-bindings-rust/development/nix_bindings_util/) + ## Changelog See the [nix-bindings-rust changelog](https://github.com/nixops4/nix-bindings-rust/blob/main/CHANGELOG.md).