Declare Package depends on Lib C?

I’m working on a package that has a dependency on some libc functionality with termios. The build.zig links to libc when building the static library. However if I want to publish this as a package, what is the right way to indicate that the module requires you to link to libc? Is there a dependency to put into the build.zig.zon?

1 Like

Module have a flag called link_libc.
Example:

    const root_source_file = .{ .path = "src/root.zig" };
    const module = b.addModule("name", .{
        .root_source_file = root_source_file,
        .link_libc = true,
    });
2 Likes