mattnite/zig-libssh2
compile libssh2 in your build.zig
If you like this project or other works of mine, please consider donating to or sponsoring me on Github :heart:
This repo contains code for your build.zig
that can statically compile libssh2.
In order to statically link libssh2 into your application:
const libssh2 = @import("path/to/libssh2.zig");
pub fn build(b: *std.build.Builder) void {
// ...
const lib = libssh2.create(b, target, optimize);
const exe = b.addExecutable(.{
.name = "my-program",
.root_source_file = .{ .path = "src/main.zig" },
});
lib.link(exe);
}