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
This commit is contained in:
Robert Hensing 2026-02-10 09:57:10 +01:00
parent a40b4f5190
commit ee43f37870
24 changed files with 51 additions and 1 deletions

View file

@ -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]

View file

@ -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;

View file

@ -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]

View file

@ -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).

View file

@ -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]

View file

@ -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).

View file

@ -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]

View file

@ -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).

View file

@ -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]

View file

@ -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).

View file

@ -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]

View file

@ -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).

View file

@ -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]

View file

@ -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).

View file

@ -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]

View file

@ -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).

View file

@ -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]

View file

@ -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).

View file

@ -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]

View file

@ -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).

View file

@ -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]

View file

@ -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).

View file

@ -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]

View file

@ -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).