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] [features]
default = [] default = []
store = ["nixide-sys/nix-store-c"] store = ["nixide-sys/nix-store-c"]
expr = ["store", "nixide-sys/nix-expr-c"] exprs = ["store", "nixide-sys/nix-expr-c"]
flake = ["store", "nixide-sys/nix-flake-c", "nixide-sys/nix-fetchers-c"] flakes = ["store", "nixide-sys/nix-flake-c", "nixide-sys/nix-fetchers-c"]
[dependencies] [dependencies]
libc = "0.2.183" libc = "0.2.183"

View file

@ -12,9 +12,9 @@ pub(crate) mod util;
mod verbosity; mod verbosity;
mod version; mod version;
#[cfg(feature = "expr")] #[cfg(feature = "exprs")]
mod expr; mod expr;
#[cfg(feature = "flake")] #[cfg(feature = "flakes")]
mod flake; mod flake;
#[cfg(feature = "store")] #[cfg(feature = "store")]
mod store; mod store;
@ -23,8 +23,10 @@ pub use errors::{NixError, NixideError, NixideResult};
pub use verbosity::{NixVerbosity, set_verbosity}; pub use verbosity::{NixVerbosity, set_verbosity};
pub use version::NixVersion; pub use version::NixVersion;
#[cfg(feature = "expr")] #[cfg(feature = "exprs")]
pub use expr::{EvalState, EvalStateBuilder, Value}; pub use expr::{EvalState, EvalStateBuilder, Value};
#[cfg(feature = "flakes")]
pub use flake::{FlakeSettings, LockedFlake};
#[cfg(feature = "store")] #[cfg(feature = "store")]
pub use store::{Store, StorePath}; pub use store::{Store, StorePath};
@ -34,7 +36,7 @@ use util::wrappers::AsInnerPtr as _;
pub(crate) static mut INIT_LIBUTIL_STATUS: Option<NixideResult<()>> = None; pub(crate) static mut INIT_LIBUTIL_STATUS: Option<NixideResult<()>> = None;
#[cfg(feature = "store")] #[cfg(feature = "store")]
pub(crate) static mut INIT_LIBSTORE_STATUS: Option<NixideResult<()>> = None; 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; pub(crate) static mut INIT_LIBEXPR_STATUS: Option<NixideResult<()>> = None;
/// # Warning /// # Warning
@ -53,9 +55,6 @@ fn init_libutil() {
} }
} }
/// # TODO
/// **Only run this if the "store" feature flag was enabled**
///
/// # Warning /// # Warning
/// ///
/// > Rust's philosophy is that nothing happens before or after main and [ctor](https://github.com/mmastrac/rust-ctor) /// > 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 /// # Warning
/// ///
/// > Rust's philosophy is that nothing happens before or after main and [ctor](https://github.com/mmastrac/rust-ctor) /// > Rust's philosophy is that nothing happens before or after main and [ctor](https://github.com/mmastrac/rust-ctor)