diff options
Diffstat (limited to 'vendor/libghostty-vt/src/os/wasm')
| -rw-r--r-- | vendor/libghostty-vt/src/os/wasm/log.zig | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/src/os/wasm/log.zig b/vendor/libghostty-vt/src/os/wasm/log.zig index faa885c6..5c5a8f66 100644 --- a/vendor/libghostty-vt/src/os/wasm/log.zig +++ b/vendor/libghostty-vt/src/os/wasm/log.zig @@ -4,6 +4,22 @@ const wasm = @import("../wasm.zig"); // Use the correct implementation pub const log = Freestanding.log; +/// A log function that discards everything. Since the format string and +/// scope are comptime parameters, using this compiles out all logging +/// machinery: call sites, format strings, and the std.fmt code they +/// reference (~220KB in a ReleaseFast wasm build). +pub fn noop( + comptime level: std.log.Level, + comptime scope: @TypeOf(.EnumLiteral), + comptime format: []const u8, + args: anytype, +) void { + _ = level; + _ = scope; + _ = format; + _ = args; +} + /// Freestanding implementation calls an extern "log" function. pub const Freestanding = struct { // The function std.log will call. |
