git.delta.rocks / jrsonnet / refs/commits / 45f5af0fdfba

difftreelog

fix native-eval stub

Yaroslav Bolyukin2024-11-14parent: #064468b.patch.diff
in: trunk

2 files changed

modifiedcrates/nix-native-eval/Cargo.tomldiffbeforeafterboth
4version.workspace = true4version.workspace = true
55
6[dependencies]6[dependencies]
7anyhow.workspace = true
7nixrs = { git = "https://github.com/Anillc/nixrs", version = "0.1.0" }8nixrs = { git = "https://github.com/Anillc/nixrs", version = "0.1.0" }
89
modifiedcrates/nix-native-eval/src/lib.rsdiffbeforeafterboth
--- a/crates/nix-native-eval/src/lib.rs
+++ b/crates/nix-native-eval/src/lib.rs
@@ -1,7 +1,11 @@
+use anyhow::Result;
 use nixrs::{State, Store};
 
-fn init() {
-	nixrs::init();
+pub fn init() -> Result<()> {
+	nixrs::init()?;
 	let store = Store::new("daemon")?;
-	let state = State::new(store)
+	let state = State::new(store)?;
+	let _ = state;
+
+	Ok(())
 }