From f6a514f34d2b2463a152c71a2543d430eddae136 Mon Sep 17 00:00:00 2001 From: _cry64 Date: Sun, 29 Mar 2026 15:42:13 +1000 Subject: [PATCH] rename features --- nixide/Cargo.toml | 4 ++-- nixide/src/lib.rs | 16 ++++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/nixide/Cargo.toml b/nixide/Cargo.toml index b9a6405..6a64ced 100644 --- a/nixide/Cargo.toml +++ b/nixide/Cargo.toml @@ -15,8 +15,8 @@ path = "src/lib.rs" [features] default = [] store = ["nixide-sys/nix-store-c"] -expr = ["store", "nixide-sys/nix-expr-c"] -flake = ["store", "nixide-sys/nix-flake-c", "nixide-sys/nix-fetchers-c"] +exprs = ["store", "nixide-sys/nix-expr-c"] +flakes = ["store", "nixide-sys/nix-flake-c", "nixide-sys/nix-fetchers-c"] [dependencies] libc = "0.2.183" diff --git a/nixide/src/lib.rs b/nixide/src/lib.rs index ccbccf1..c4b7be6 100644 --- a/nixide/src/lib.rs +++ b/nixide/src/lib.rs @@ -12,9 +12,9 @@ pub(crate) mod util; mod verbosity; mod version; -#[cfg(feature = "expr")] +#[cfg(feature = "exprs")] mod expr; -#[cfg(feature = "flake")] +#[cfg(feature = "flakes")] mod flake; #[cfg(feature = "store")] mod store; @@ -23,8 +23,10 @@ pub use errors::{NixError, NixideError, NixideResult}; pub use verbosity::{NixVerbosity, set_verbosity}; pub use version::NixVersion; -#[cfg(feature = "expr")] +#[cfg(feature = "exprs")] pub use expr::{EvalState, EvalStateBuilder, Value}; +#[cfg(feature = "flakes")] +pub use flake::{FlakeSettings, LockedFlake}; #[cfg(feature = "store")] pub use store::{Store, StorePath}; @@ -34,7 +36,7 @@ use util::wrappers::AsInnerPtr as _; pub(crate) static mut INIT_LIBUTIL_STATUS: Option> = None; #[cfg(feature = "store")] pub(crate) static mut INIT_LIBSTORE_STATUS: Option> = None; -#[cfg(feature = "expr")] +#[cfg(feature = "exprs")] pub(crate) static mut INIT_LIBEXPR_STATUS: Option> = None; /// # Warning @@ -53,9 +55,6 @@ fn init_libutil() { } } -/// # TODO -/// **Only run this if the "store" feature flag was enabled** -/// /// # Warning /// /// > Rust's philosophy is that nothing happens before or after main and [ctor](https://github.com/mmastrac/rust-ctor) @@ -74,9 +73,6 @@ fn init_libstore() { } } -/// # TODO -/// **Only run this if the "expr" feature flag was enabled** -// /// # Warning /// /// > Rust's philosophy is that nothing happens before or after main and [ctor](https://github.com/mmastrac/rust-ctor)