From 0266e22379c822e9ffa6e7bd7b071914ebe497bd Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 13 Jan 2026 16:49:52 +0100 Subject: [PATCH] Add CHANGELOG and crate READMEs - Add CHANGELOG.md documenting 0.1.0 and 0.2.0 releases with contributor credits and PR links - Add README.md to each crate linking to the changelog - Link READMEs in Cargo.toml files - Add repository field to -sys crates that were missing it - Update top-level README to reference changelog and reflect -sys crate split - Document changelog update step in release process --- CHANGELOG.md | 83 ++++++++++++++++++++++++++++ README.md | 3 +- doc/maintainers/release.md | 11 +++- nix-bindings-bdwgc-sys/Cargo.toml | 2 + nix-bindings-bdwgc-sys/README.md | 4 ++ nix-bindings-expr-sys/Cargo.toml | 2 + nix-bindings-expr-sys/README.md | 4 ++ nix-bindings-expr/Cargo.toml | 1 + nix-bindings-expr/README.md | 7 +++ nix-bindings-fetchers-sys/Cargo.toml | 2 + nix-bindings-fetchers-sys/README.md | 4 ++ nix-bindings-fetchers/Cargo.toml | 1 + nix-bindings-fetchers/README.md | 7 +++ nix-bindings-flake-sys/Cargo.toml | 2 + nix-bindings-flake-sys/README.md | 4 ++ nix-bindings-flake/Cargo.toml | 1 + nix-bindings-flake/README.md | 7 +++ nix-bindings-store-sys/Cargo.toml | 2 + nix-bindings-store-sys/README.md | 4 ++ nix-bindings-store/Cargo.toml | 1 + nix-bindings-store/README.md | 7 +++ nix-bindings-util-sys/Cargo.toml | 1 + nix-bindings-util-sys/README.md | 4 ++ nix-bindings-util/Cargo.toml | 1 + nix-bindings-util/README.md | 7 +++ 25 files changed, 170 insertions(+), 2 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 nix-bindings-expr/README.md create mode 100644 nix-bindings-fetchers/README.md create mode 100644 nix-bindings-flake/README.md create mode 100644 nix-bindings-store/README.md create mode 100644 nix-bindings-util/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7c8ea3a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,83 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.2.0] - 2026-01-13 + +### Added + +- Workaround for automatic C library input propagation in downstream Nix builds. ([#27] by [@roberth]) +- `EvalStateBuilder::load_ambient_settings()` to control whether global Nix settings are loaded. ([#36] by [@roberth]) + +### Fixed + +- Path coercion failing with "path does not exist" errors due to missing `eval_state_builder_load()` call. ([#36] by [@aanderse]) + +### Changed + +- Split `nix-bindings-util-sys` (which contained all low-level FFI bindings) into separate per-library `*-sys` crates. ([#27] by [@Ericson2314]) + This allows downstream crates to depend on just the low-level bindings they need without pulling in higher-level crates. + +## [0.1.0] - 2026-01-12 + +Initial release, extracted from the [nixops4 repository](https://github.com/nixops4/nixops4). + +### Added + +- `nix-bindings-store`: Rust bindings for Nix store operations + - Store opening (auto, from URI, from environment) + - Store path parsing and manipulation + - `Store::get_fs_closure` ([#12] by [@RossComputerGuy], [@roberth]) + - `Clone` for `Derivation` ([#25] by [@Ericson2314]) + - Store deduplication workaround for [nix#11979] + - aarch64 ABI support ([#26] by [@RossComputerGuy]) +- `nix-bindings-expr`: Rust bindings for Nix expression evaluation + - `EvalState` for evaluating Nix expressions + - Value creation (int, string, attrs, thunks, primops, etc.) + - Value inspection/extraction (`require_*` functions) + - Attribute selection and manipulation + - Thread registration for GC safety +- `nix-bindings-fetchers`: Rust bindings for Nix fetchers +- `nix-bindings-flake`: Rust bindings for Nix flake operations + - Flake locking + - Flake overriding +- `nix-bindings-util`: Shared utilities + - Context management for Nix C API error handling + - Settings access +- `nix-bindings-util-sys`: Low-level FFI bindings for all Nix C libraries + +### Contributors + +Thanks to everyone who contributed to the initial development, some of whom may not be listed with individual changes above: + +- [@aanderse] +- [@Ericson2314] +- [@ErinvanderVeen] +- [@numinit] +- [@prednaz] +- [@Radvendii] +- [@roberth] +- [@RossComputerGuy] + + + +[@aanderse]: https://github.com/aanderse +[@Ericson2314]: https://github.com/Ericson2314 +[@ErinvanderVeen]: https://github.com/ErinvanderVeen +[@numinit]: https://github.com/numinit +[@prednaz]: https://github.com/prednaz +[@Radvendii]: https://github.com/Radvendii +[@roberth]: https://github.com/roberth +[@RossComputerGuy]: https://github.com/RossComputerGuy + +[#12]: https://github.com/nixops4/nix-bindings-rust/pull/12 +[#25]: https://github.com/nixops4/nix-bindings-rust/pull/25 +[#26]: https://github.com/nixops4/nix-bindings-rust/pull/26 +[#27]: https://github.com/nixops4/nix-bindings-rust/pull/27 +[#36]: https://github.com/nixops4/nix-bindings-rust/pull/36 +[0.2.0]: https://github.com/nixops4/nix-bindings-rust/compare/0.1.0...0.2.0 +[0.1.0]: https://github.com/nixops4/nix-bindings-rust/releases/tag/0.1.0 +[nix#11979]: https://github.com/NixOS/nix/issues/11979 diff --git a/README.md b/README.md index 44c0975..ad6f2ac 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This workspace provides multiple crates that wrap different layers of the Nix C - **`nix-bindings-flake`** - Flake operations - **`nix-bindings-fetchers`** - Fetcher functionality (requires Nix ≥ 2.29) -The `nix-bindings-util-sys` crate contains the generated FFI bindings and is not intended for direct use. +The `*-sys` crates contain generated FFI bindings and are not intended for direct use. ## Features @@ -211,6 +211,7 @@ For VSCode, load the dev shell via Nix Env Selector extension or direnv. ## Documentation +- [Changelog](CHANGELOG.md) - [Nix C API Reference][C API] - [nix-cargo-integration][nix-cargo-integration] - [Hacking Guide](doc/hacking/test-ffi.md) diff --git a/doc/maintainers/release.md b/doc/maintainers/release.md index 59056dd..3b0f03b 100644 --- a/doc/maintainers/release.md +++ b/doc/maintainers/release.md @@ -1,9 +1,18 @@ - # Release process This project uses simple tags, that trigger a release of all crates using Hercules CI. See [HCI Effects cargo publish workflow]. +## Before tagging + +- Update `CHANGELOG.md`: + - Make sure the Unreleased section is up to date + - Change it to the new version and release date + +## After tagging + +- Add a new Unreleased section to `CHANGELOG.md` + Dissatisfied with the coarse grained release process? Complain to @roberth and he'll get it done for you. [HCI Effects cargo publish workflow]: https://docs.hercules-ci.com/hercules-ci-effects/reference/flake-parts/cargo-publish/#_releasing_a_version diff --git a/nix-bindings-bdwgc-sys/Cargo.toml b/nix-bindings-bdwgc-sys/Cargo.toml index bf75ca7..ff4bc1e 100644 --- a/nix-bindings-bdwgc-sys/Cargo.toml +++ b/nix-bindings-bdwgc-sys/Cargo.toml @@ -4,6 +4,8 @@ version = "0.2.0" edition = "2021" build = "build.rs" license = "LGPL-2.1" +repository = "https://github.com/nixops4/nix-bindings-rust" +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/nix-bindings-bdwgc-sys/README.md b/nix-bindings-bdwgc-sys/README.md index 3723e90..80988a5 100644 --- a/nix-bindings-bdwgc-sys/README.md +++ b/nix-bindings-bdwgc-sys/README.md @@ -2,3 +2,7 @@ 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. + +## 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 39518fc..1512326 100644 --- a/nix-bindings-expr-sys/Cargo.toml +++ b/nix-bindings-expr-sys/Cargo.toml @@ -4,6 +4,8 @@ version = "0.2.0" edition = "2021" build = "build.rs" license = "LGPL-2.1" +repository = "https://github.com/nixops4/nix-bindings-rust" +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/nix-bindings-expr-sys/README.md b/nix-bindings-expr-sys/README.md index ccdcc26..906f366 100644 --- a/nix-bindings-expr-sys/README.md +++ b/nix-bindings-expr-sys/README.md @@ -3,3 +3,7 @@ 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. + +## 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 4e64c63..f72ea6e 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" +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/nix-bindings-expr/README.md b/nix-bindings-expr/README.md new file mode 100644 index 0000000..ebd889a --- /dev/null +++ b/nix-bindings-expr/README.md @@ -0,0 +1,7 @@ +# nix-bindings-expr + +Rust bindings to the Nix expression evaluator. + +## 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 6101928..a4742c9 100644 --- a/nix-bindings-fetchers-sys/Cargo.toml +++ b/nix-bindings-fetchers-sys/Cargo.toml @@ -4,6 +4,8 @@ version = "0.2.0" edition = "2021" build = "build.rs" license = "LGPL-2.1" +repository = "https://github.com/nixops4/nix-bindings-rust" +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/nix-bindings-fetchers-sys/README.md b/nix-bindings-fetchers-sys/README.md index b403eac..87113b6 100644 --- a/nix-bindings-fetchers-sys/README.md +++ b/nix-bindings-fetchers-sys/README.md @@ -3,3 +3,7 @@ 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. + +## 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 cf216a0..fde4ce5 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" +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/nix-bindings-fetchers/README.md b/nix-bindings-fetchers/README.md new file mode 100644 index 0000000..6d23b13 --- /dev/null +++ b/nix-bindings-fetchers/README.md @@ -0,0 +1,7 @@ +# nix-bindings-fetchers + +Rust bindings to the nix-fetchers library. + +## 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 e53bbe4..ecc3e99 100644 --- a/nix-bindings-flake-sys/Cargo.toml +++ b/nix-bindings-flake-sys/Cargo.toml @@ -4,6 +4,8 @@ version = "0.2.0" edition = "2021" build = "build.rs" license = "LGPL-2.1" +repository = "https://github.com/nixops4/nix-bindings-rust" +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/nix-bindings-flake-sys/README.md b/nix-bindings-flake-sys/README.md index 10a9d96..84114d7 100644 --- a/nix-bindings-flake-sys/README.md +++ b/nix-bindings-flake-sys/README.md @@ -3,3 +3,7 @@ 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. + +## 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 78e8460..30a426d 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" +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/nix-bindings-flake/README.md b/nix-bindings-flake/README.md new file mode 100644 index 0000000..6fda25d --- /dev/null +++ b/nix-bindings-flake/README.md @@ -0,0 +1,7 @@ +# nix-bindings-flake + +Rust bindings to Nix flakes. + +## 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 c098860..c1e03f2 100644 --- a/nix-bindings-store-sys/Cargo.toml +++ b/nix-bindings-store-sys/Cargo.toml @@ -4,6 +4,8 @@ version = "0.2.0" edition = "2021" build = "build.rs" license = "LGPL-2.1" +repository = "https://github.com/nixops4/nix-bindings-rust" +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/nix-bindings-store-sys/README.md b/nix-bindings-store-sys/README.md index 73138ee..31a2d7e 100644 --- a/nix-bindings-store-sys/README.md +++ b/nix-bindings-store-sys/README.md @@ -3,3 +3,7 @@ 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. + +## 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 e0ed8a0..8a018dd 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" +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/nix-bindings-store/README.md b/nix-bindings-store/README.md new file mode 100644 index 0000000..1df35eb --- /dev/null +++ b/nix-bindings-store/README.md @@ -0,0 +1,7 @@ +# nix-bindings-store + +Rust bindings to the Nix store library. + +## 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 e37bf1a..6c38fab 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" +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/nix-bindings-util-sys/README.md b/nix-bindings-util-sys/README.md index 82debbf..7e762d5 100644 --- a/nix-bindings-util-sys/README.md +++ b/nix-bindings-util-sys/README.md @@ -3,3 +3,7 @@ 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. + +## 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 6c0d9db..5c68a56 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" +readme = "README.md" [lib] path = "src/lib.rs" diff --git a/nix-bindings-util/README.md b/nix-bindings-util/README.md new file mode 100644 index 0000000..895b7cf --- /dev/null +++ b/nix-bindings-util/README.md @@ -0,0 +1,7 @@ +# nix-bindings-util + +Rust bindings to the Nix utility library. + +## Changelog + +See the [nix-bindings-rust changelog](https://github.com/nixops4/nix-bindings-rust/blob/main/CHANGELOG.md).