Skip to content

Commit ea93b0a

Browse files
committed
fix: avoid compiling xtask for wasm
1 parent c1739da commit ea93b0a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

xtask/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ enum Task {
3737
CodeGen,
3838
}
3939

40+
#[cfg(target_family = "wasm")]
41+
fn main() {}
42+
43+
#[cfg(not(target_family = "wasm"))]
4044
fn main() -> Result<()> {
4145
let cli = Cli::parse();
4246

@@ -50,6 +54,7 @@ fn main() -> Result<()> {
5054
Ok(())
5155
}
5256

57+
#[cfg(not(target_family = "wasm"))]
5358
fn task_fetch_api_spec() -> Result<()> {
5459
println!("▶️ Running codegen task...");
5560

0 commit comments

Comments
 (0)