Skip to content

Commit 8047c31

Browse files
committed
Allow compiling for wasm
1 parent 335b142 commit 8047c31

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

Cargo.lock

Lines changed: 56 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ lto = true
1313
codegen-units = 1
1414
strip = true
1515

16+
[lib]
17+
crate-type = ["cdylib", "rlib"]
18+
1619
[features]
1720
bin = ["dep:clap"]
1821
js = ["dep:oxc"]
@@ -22,6 +25,7 @@ native = [
2225
"dep:cranelift-jit",
2326
"dep:cranelift-native",
2427
]
28+
wasm = ["dep:wasm-bindgen"]
2529

2630
[dependencies]
2731
anyhow = "1.0.93"
@@ -40,6 +44,9 @@ cranelift-native = { version = "0.114", optional = true }
4044
# Js depedencies
4145
oxc = { version = "0.38.0", features = ["full"], optional = true }
4246

47+
# Wasm support
48+
wasm-bindgen = { version = "0.2.97", optional = true }
49+
4350

4451
[build-dependencies]
4552
lalrpop = "0.22.0"

0 commit comments

Comments
 (0)