Skip to content

Commit 4154612

Browse files
committed
add dev env for wasm
with this I get 5s compilations
1 parent 794b637 commit 4154612

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/dev.zig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ pub const Env = enum {
3030
/// - `zig build-* -fno-llvm -fno-lld -target riscv64-linux`
3131
@"riscv64-linux",
3232

33+
/// - sema
34+
/// - `zig build-* -fno-llvm -fno-lld -target wasm32-* --listen=-`
35+
wasm,
36+
3337
pub inline fn supports(comptime dev_env: Env, comptime feature: Feature) bool {
3438
return switch (dev_env) {
3539
.full => true,
@@ -144,6 +148,14 @@ pub const Env = enum {
144148
=> true,
145149
else => Env.sema.supports(feature),
146150
},
151+
.wasm => switch (feature) {
152+
.stdio_listen,
153+
.incremental,
154+
.wasm_backend,
155+
.wasm_linker,
156+
=> true,
157+
else => Env.sema.supports(feature),
158+
},
147159
};
148160
}
149161

0 commit comments

Comments
 (0)