1 day ago · Tech · hide · 0 comments

I'm excited to announce zmx can now be used as a zig module to programmtically interact build session persistence in your zig project. Projects can use this instead of embedding the zmx binary and exec spawning commands through the zmx cli. This zig module is just a thin wrapper around a unix socket ipc wire protocol to interface with the running zmx daemon that controls the terminal session. libzmx-commit quick start The library in `src/lib.zig` is importable as the `zmx` package from other Zig projects. All functions take `(alloc, io, ...)` from `std.process.Init`. Read the source code to learn about what you can do with zmx // build.zig.zon .dependencies = .{ .zmx = .{ .url = "git+https://github.com/neurosnap/zmx#<commit>", .hash = "...", }, } // build.zig const zmx = b.dependency("zmx", .{ .target = target, .optimize = optimize }); exe_mod.addImport("zmx", zmx.module("zmx")); // your source const zmx = @import("zmx"); const exit_code = try zmx.run(gpa, io, "my-session", &.{"echo",…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.