Skip to content

omissis/zig-spew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pretty printer for Zig data structures to help with debugging.

zig-spew output

Badges

GitHub release (latest SemVer) GitHub Workflow Status (event) License GitHub code size in bytes GitHub repo file count (file type) GitHub all releases GitHub commit activity

Example usage

const std = @import("std");
const spew = @import("spew");

pub fn main() !void {
    const d = spew.Dumper{};

    const Currency = struct {
        Name: []const u8,
        Symbol: []const u8,
    };
    const Money = struct {
        Amount: u32,
        Currency: Currency,
    };
    const m = Money{
        .Amount = 1000,
        .Currency = .{
            .Name = "Euro",
            .Symbol = "€",
        },
    };

    try d.print(m);

    try spew.dump(m);
}

About

Pretty printer for Zig data structures to help with debugging

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages