add dev env for wasm

with this I get 5s compilations
This commit is contained in:
Andrew Kelley 2024-12-14 13:52:46 -08:00
parent 7879d2cf41
commit 4a4fb16c27

View File

@ -30,6 +30,10 @@ pub const Env = enum {
/// - `zig build-* -fno-llvm -fno-lld -target riscv64-linux`
@"riscv64-linux",
/// - sema
/// - `zig build-* -fno-llvm -fno-lld -target wasm32-* --listen=-`
wasm,
pub inline fn supports(comptime dev_env: Env, comptime feature: Feature) bool {
return switch (dev_env) {
.full => true,
@ -144,6 +148,14 @@ pub const Env = enum {
=> true,
else => Env.sema.supports(feature),
},
.wasm => switch (feature) {
.stdio_listen,
.incremental,
.wasm_backend,
.wasm_linker,
=> true,
else => Env.sema.supports(feature),
},
};
}