8000 Release Release v0.10.1 · zigzap/zap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Release v0.10.1

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 01 Apr 14:41

ZAP Release v0.10.1

Updates

Rebased Zap's logging on Zig's std.lo 4A4A g

Zap's logging is now based on zig's std.log.

You can set a custom log level just for Zap in your Zig projects like
this:

pub const std_options: std.Options = .{
    // general log level
    .log_level = .info,
    .log_scope_levels = &[_]std.log.ScopeLevel{
        // log level specific to zap
        .{ .scope = .zap, .level = .debug },
    },
};

Low-level access to facil.io's logging facilities is provided by
zap.Logging.

Using it

In your zig project folder (where build.zig is located), run:

zig fetch --save "git+https://github.com/zigzap/zap#v0.10.1"

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"));
0