Oxidized bindings for the Nix package manager!!
Fixes #106 The Nix settings system uses global mutable state without internal synchronization. When multiple threads call settings::set concurrently (as happens in parallel test execution), this causes a segfault in the C++ std::set implementation. Changes: - Add mutex to serialize access through the Rust API - Add documentation explaining thread safety limitations - Add Once guard in nix-flake tests to minimize concurrent access The mutex provides protection between Rust callers, though it cannot completely prevent C++ Nix code from modifying settings concurrently. (cherry picked from commit 203917657b60c4e1dcbaf442bec64c37c634abc4) |
||
|---|---|---|
| .claude | ||
| .vscode | ||
| dev | ||
| doc/hacking | ||
| rust | ||
| .envrc | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
nix_bindings_* crates
Use the Nix C API from Rust.
Hacking
The following will open a shell with dependencies, and install pre-commit for automatic formatting.
$ nix develop
VSCode
rust-analyzer
If the rust-analyzer extension fails, make sure the devShell was loaded into VSCode via Nix Env Selector or direnv.