summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--build.zig.zon4
-rw-r--r--src/Config.zig6
-rw-r--r--src/main.zig2
3 files changed, 6 insertions, 6 deletions
diff --git a/build.zig.zon b/build.zig.zon
index a65c537..7923a60 100644
--- a/build.zig.zon
+++ b/build.zig.zon
@@ -17,8 +17,8 @@
             .hash = "vaxis-0.5.1-BWNV_MYNCQDO92x2PTpsfv6GwDHmjL98rf6iL3pbMLj4",
         },
         .zsanett = .{
-            .url = "git+https://trong.loang.net/~cnx/zsanett#f9aadd1c3e5407521af2f5d2af66e0d2936b362b",
-            .hash = "zsanett-0.0.0-1TMqaNnFAAAl2HUPcmy9fpePQQUi1j-2WxR1tgrFZS1M",
+            .url = "git+https://trong.loang.net/~cnx/zsanett#b2addf1901c1540797d740f35594df1ed7e72027",
+            .hash = "zsanett-0.0.0-1TMqaEbLAABbm3ueu1BMakaJ22PDqCGWpCA4yRYPacgB",
         },
     },
     .paths = .{
diff --git a/src/Config.zig b/src/Config.zig
index 51fc885..cd797ad 100644
--- a/src/Config.zig
+++ b/src/Config.zig
@@ -8,13 +8,13 @@ const maxInt = std.math.maxInt;
 const joinPath = std.fs.path.joinZ;
 const std = @import("std");
 
+const Environment = @import("zsanett").Environment;
 const folders = @import("known-folders");
-const zsanett = @import("zsanett");
 
 const Config = @This();
 tab_width: u8 = 8,
 
-pub fn parse(allocator: Allocator, env: *zsanett.Table) !Config {
+pub fn parse(allocator: Allocator, env: Environment) !Config {
     if (try folders.getPath(allocator, .local_configuration)) |local_conf| {
         defer allocator.free(local_conf);
         const path = try joinPath(allocator, &.{
@@ -25,7 +25,7 @@ pub fn parse(allocator: Allocator, env: *zsanett.Table) !Config {
         defer allocator.free(path);
         if (cwd().readFileAlloc(allocator, path, maxInt(u32))) |content| {
             defer allocator.free(content);
-            return try zsanett.eval(Config, env, content, path.ptr);
+            return try env.eval(Config, content, path.ptr);
         } else |err| switch (err) {
             error.FileNotFound => return .{},
             else => return err,
diff --git a/src/main.zig b/src/main.zig
index 5e91719..aec275c 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -38,7 +38,7 @@ pub fn main() !void {
 
     zsanett.init();
     defer zsanett.deinit();
-    const janet_env = zsanett.coreEnv(null);
+    const janet_env = zsanett.Environment.init(null);
     const config = try Config.parse(allocator, janet_env);
 
     var tty = try Tty.init();