release-0.0.23
Pre-release
Pre-release
renerocksai
released this
20 May 01:19
·
422 commits
to master
since this release
ZAP Release release-0.0.23
Updates
- zap.Middleware.EndpointHander : use endpoints in your middleware chain
- zap.SimpleRequest.get/setContext() : used internally, but you can, too set a per-request context now
See the README for more details and examples.
Using it
To use in your own projects, put this dependency into your build.zig.zon
:
// zap release-0.0.23
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.23.tar.gz",
.hash = "1220175a7495f41889208349fedd6a35e96d8e413e5cd23b9b875e40d176bad459e1",
}
Here is a complete build.zig.zon
example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.23
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.23.tar.gz",
.hash = "1220175a7495f41889208349fedd6a35e96d8e413e5cd23b9b875e40d176bad459e1",
}
}
}
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"));