#Why can't I get zig to autogenerate headers in v14

1 messages · Page 1 of 1 (latest)

inner geyser
#
const std = @import("std");

pub fn build(b: *std.Build) void {
    const target = b.standardTargetOptions(.{});
    const optimize = b.standardOptimizeOption(.{});

    const lib = b.addLibrary(.{
        .name = "zig",
        .root_module = b.createModule(.{
            .root_source_file = .{ .cwd_relative = "src/root.zig" },
            .optimize = optimize,
            .target = target,
        }),
        .linkage = .static
    });

    b.installArtifact(lib);

    const install_header = b.addInstallFile(lib.getEmittedH(), "include");
    b.getInstallStep().dependOn(&install_header.step);
}
shrewd bison
#

The emit-h feature is pretty bitrotten and doesn't work right now. There are definitely plans to make it work, but no one has stepped up to the challenge yet and the team is focused on more important stuff.

inner geyser
#

oh aight, thanks!