Anillc/nixrs

Nix binding for Rust

★ 6Forks 1RustGitHub ↗Compare

README

nixrs

Nix binding for Rust

Examples

See examples

cd nixrs && cargo run --example eval
use nixrs::{init, state::State, store::Store};

fn main() -> anyhow::Result<()> {
    init()?;
    let mut state = State::new(Store::new("daemon")?)?;
    let libclang = &state.eval("(import <nixpkgs> {}).libclang")?;
    dbg!(state.build(libclang)?);
    Ok(())
}

Contributors

Anillcflosse

Issues