Skip to content

release-0.0.20

Pre-release
Pre-release
Compare
Choose a tag to compare
@renerocksai renerocksai released this 16 May 02:07
· 447 commits to master since this release

ZAP Release release-0.0.20

Updates

SimpleEndpointListener now uses the on_request callback if no endpoint matches the requested URL. See the updated endpoint example.

Using it

To use in your own projects, put this dependency into your build.zig.zon:

        // zap release-0.0.20
        .zap = .{
            .url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.20.tar.gz",
            .hash = "12200772b594bc50bbdc18b14aa3c7461991a33179f9c254de05eb34d214662971da",
        }

Here is a complete build.zig.zon example:

.{
    .name = "My example project",
    .version = "0.0.1",

    .dependencies = .{
        // zap release-0.0.20
        .zap = .{
            .url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.20.tar.gz",
            .hash = "12200772b594bc50bbdc18b14aa3c7461991a33179f9c254de05eb34d214662971da",
        }
    }
}

Then, in your build.zig's build function, add the following before
exe.install():

    const zap = b.dependency("zap", .{
        .target = target,
        .optimize = optimize,
    });
    exe.addModule("zap", zap.module("zap"));
    exe.linkLibrary(zap.artifact("facil.io"));