zig-libssh2

compile libssh2 in your build.zig

MIT License

Stars
4
Committers
4

libssh2 build package

Like this project?

If you like this project or other works of mine, please consider donating to or sponsoring me on Github ❤️

How to use

This repo contains code for your build.zig that can statically compile libssh2.

Link to your application

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);
}