dylibso / dylibso/xtp-zig-bindgen

expose utils from extism, particularly logging

Open
#10 0 comments 0 reactions 1 assignee Claimed by @nilslice View on GitHub
Dominant language
EJS
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Description

very convenient to have a function like:
```zig
/// Logs format string to host, if log level is enabled.
pub fn log(level: comptime_int, comptime fmt: []const u8, args: anytype) !void {
const msg = try std.fmt.allocPrint(_plugin.allocator, fmt, args);
_plugin.log(@enumFromInt(level), msg);
}
```

Which is better if we have `pub` LogLevel in Extism zig-pdk, among other changes: https://github.com/extism/zig-pdk/issues/37

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.