Release v0.8.0
Pre-releaseZAP Release v0.8.0
Updates
Update to Zig 0.13
With the help of our awesome contributers, we have a new release:
- Zap is now officially based on Zig 0.13.0!
- Thx to Lois Pearson, we now have
mimetypeRegister
andmimetypeClear
- Thx to geemili, we don't need to link facil.io in our build.zigs anymore
- Thx to Sören Michaels,
methodAsEnum
supports theHEAD
method. - ... and more, see the changelog below
Note: there now is a zig-master
branch that gets updated with breaking changes of Zig master on a somewhat regular basis. Please feel free to send PRs.
Many thanks again to everyone who helped out:
Giuseppe Cesarano (1):
fix: _debug typo in startWithLogging
Joe Koop (1):
update http.zig to rfc9110 using MDN as a reference
Lord Asdi (1):
fix: use std.process.getEnvVarOwned instead of std.posix.getenv
Louis Pearson (8):
fix: last_modifed -> last_modified
fix: docserver: server wasm with correct mimetype
feat: Wrap mimetypeRegister and mimetypeClear
fix: move getHeaderCommon to zap.zig
feat: add parseAccept
feat: make example for parseAccept
fix: simplify accept header api somewhat
feat: pre-allocate enough space for accept items
Michael Wendt (1):
feat: remove deprecated path
Rene Schallner (18):
Update hello_json.zig
fix docserver invocation from build.zig
proposed change to parseAccept API
make zap master build with zig master
update zig version
updated zig-master check in CI
update badge in README
corrected release templates
Sören Michaels (1):
feat: add HEAD Method to methodAsEnum
geemili (1):
feat: streamline depending on zap by linking facil.io to module
Using it
To use in your own projects, put this dependency into your build.zig.zon
:
// zap v0.8.0
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/v0.8.0.tar.gz",
.hash = "12209936c3333b53b53edcf453b1670babb9ae8c2197b1ca627c01e72670e20c1a21",
}
Here is a complete build.zig.zon
example:
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap v0.8.0
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/v0.8.0.tar.gz",
.hash = "12209936c3333b53b53edcf453b1670babb9ae8c2197b1ca627c01e72670e20c1a21",
},
},
.paths = .{
"",
},
}
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"));