I have the following build.zig
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const mod = b.addModule("zlisp", .{
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});
const pcre2_dep = b.dependency("pcre2", .{
.target = target,
.optimize = optimize,
});
mod.linkLibrary(pcre2_dep.artifact("pcre2-8"));
const lib_unit_tests = b.addTest(.{
.root_module = mod,
});
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
const test_step = b.step("test", "Run unit tests");
test_step.dependOn(&run_lib_unit_tests.step);
}
How could I compile it for -Dtarget=wasm32-emscripten? If I try to build it I get the error
.cache/zig/p/N-V-__8AAPaj4AA7tqCGizncMhl8gm8AX1wmXFaB7jH2tJoq/src/pcre2_internal.h:83:10: error: 'ctype.h' file not found
#include <ctype.h>
So I'm missing some compile step to link c header files to pcre2, but I'm not sure how to proceed. Searches online did not yield any result.