Zig
Zymbol's native library targets Zig 0.17.0. Functions let you provide your own buffers or use allocating rendering helpers.
terminal
zig fetch --save https://github.com/ekkolon/zymbol/archive/refs/tags/v1.0.2.tar.gzBuild dependency
zig
const zymbol_dep = b.dependency("zymbol", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("zymbol", zymbol_dep.module("zymbol"));Render a PNG
zig
const zymbol = @import("zymbol");
var png = try zymbol.render.pngText(
allocator, "https://example.com", .{},
);
defer png.deinit();
// png.bytes contains the PNG data.For caller-owned memory, use encodeText with requiredCells and requiredEncodeScratch.