rename features

This commit is contained in:
do butterflies cry? 2026-03-29 15:42:13 +10:00
parent 2ac4bcfb9a
commit f6a514f34d
Signed by: cry
GPG key ID: F68745A836CA0412
2 changed files with 8 additions and 12 deletions

View file

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

View file

@ -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<NixideResult<()>> = None;
#[cfg(feature = "store")]
pub(crate) static mut INIT_LIBSTORE_STATUS: Option<NixideResult<()>> = None;
#[cfg(feature = "expr")]
#[cfg(feature = "exprs")]
pub(crate) static mut INIT_LIBEXPR_STATUS: Option<NixideResult<()>> = 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)