#How to enable wasm features in build.zig

1 messages · Page 1 of 1 (latest)

mortal wyvern
long glacier
#

For some reason even doing that example exactly is not working on 0.16, I'll keep looking into this

#

The build system is so confusing sometimes 🙃 I am building two wasm modules in this build script, they both get passed the same

b.resolveTargetQuery(.{
    .cpu_arch = .wasm32,
    .os_tag = .freestanding,
    .cpu_model = .{ .explicit = &Target.wasm.cpu.mvp },
    .cpu_features_add = Target.wasm.featureSet(&.{
        .atomics,
        .bulk_memory,
        .bulk_memory_opt,
        .simd128,
    }),
})

but only one of their build commands actually has the correct -target wasm32-freestanding -mcpu mvp+atomics+bulk_memory+bulk_memory_opt+simd128 while the other is just -target wasm32-freestanding -mcpu baseline