Skip to content

Commit

Permalink
add dev env for wasm
Browse files Browse the repository at this point in the history
with this I get 5s compilations
  • Loading branch information
andrewrk committed Dec 14, 2024
1 parent 794b637 commit 4154612
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/dev.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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),
},
};
}

Expand Down

0 comments on commit 4154612

Please sign in to comment.