Replace config getters and store ops with nix-bindings-rust C API#1582
Draft
amaanq wants to merge 4 commits intoNixOS:masterfrom
Draft
Replace config getters and store ops with nix-bindings-rust C API#1582amaanq wants to merge 4 commits intoNixOS:masterfrom
amaanq wants to merge 4 commits intoNixOS:masterfrom
Conversation
ec59a76 to
734b093
Compare
artemist
suggested changes
Mar 20, 2026
|
|
||
| fn nix_setting_list(key: &str) -> Vec<String> { | ||
| nix_setting(key) | ||
| .split_whitespace() |
Member
There was a problem hiding this comment.
Can we guarantee no values will have spaces? I am not confident there is a better way, though.
| include_outputs: bool, | ||
| include_derivers: bool, | ||
| toposort: bool, | ||
| _toposort: bool, |
Member
There was a problem hiding this comment.
If _toposort is not functional then we should not keep it as an argument. We should instead verify that if users are relying on it being toposorted then than the functional ready toposorts.
6831e65 to
76975ea
Compare
…ctly from query Callers went through `FfiRealisation.as_rust()` to deserialize the JSON into a `Realisation` every time. Inlining that into the trait method removes the wrapper struct, the unsafe Send/Sync impls, and the extra conversion step at each call site.
682f746 to
185d40a
Compare
…closure nix-utils: fix compute_fs_closures using name() instead of real_path()
185d40a to
0094fe9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
FfiRealisationwrapper, returnRealisationdirectly from query #1581This PR replaces several C++ FFI functions with their nix-bindings-rust equivalents, using the Nix C API directly from Rust.
get_store_dir,get_nix_version,get_this_system,get_extra_platforms,get_system_features,get_substituters,get_use_cgroups,set_verbosityreplaced withnix_bindings_util::settings::getandnix_bindings_store::Store::open.nix_bindings_store::Store::get_fs_closure.nix_bindings_store::Store::is_valid_path.