Release v0.9.0
Pre-releaseZAP Release v0.9.0
Updates
Small API Refactors
This is a small update from recent PRs with little breaking changes in
zap.Mustache
and zap.Middleware.EndpointHandler
. Thanks for the
great contributions! See the changelog below.
Also: we now use zig fetch!
This greatly simplifies the instructions in the README and release
notes.
Breaking Changes:
Mustache:
- renamed
zap.Mustache.MustacheLoadArgs
tozap.Mustache.LoadArgs
zap.Mustache.BuildResult
is a public type now
Middleware:
zap.Middleware.EndpointHandler
now takes more than one option:
/// Options used to change the behavior of an `EndpointHandler`
pub const EndpointHandlerOptions = struct {
/// If `true`, the handler will stop handing requests down the chain if the
/// endpoint processed the request.
breakOnFinish: bool = true,
/// If `true`, the handler will only execute against requests that match
/// the endpoint's `path` setting.
checkPath: bool = false,
};
I updated the docs and zig-master branch, too.
Changelog:
Rene Schallner (5):
Merge pull request #117 from cosmicboots/mustache-build
doc: getHeader need lowercase keys
Merge pull request #120 from cosmicboots/endpoint-middleware
Merge pull request #127 from iacore/patch-1
docs, announceybot: switch to using zig fetch
Thom Dickson (4):
include BuildResult in public Mustache API
rename MustacheLoadArgs to LoadArgs
Create options for EndpointHandler
update docs and examples for endpoint middleware
iacore (1):
update docs for zap.start
Using it
In your zig project folder (where build.zig
is located), run:
zig fetch --save "git+https://github.com/zigzap/zap#v0.9.0"
Then, in your build.zig
's build
function, add the following before
b.installArtifact(exe)
:
const zap = b.dependency("zap", .{
.target = target,
.optimize = optimize,
.openssl = false, // set to true to enable TLS support
});
exe.root_module.addImport("zap", zap.module("zap"));