Skip to content

Commit 44b705a

Browse files
authored
v2: add wasm (#435)
another crate to copy over
1 parent f2ba3b8 commit 44b705a

File tree

5 files changed

+327
-19
lines changed

5 files changed

+327
-19
lines changed

Cargo.lock

Lines changed: 145 additions & 19 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
@@ -36,6 +36,12 @@ rowan = "0.15.15"
3636
smol_str = "0.3.2"
3737
enum-iterator = "2.1.0"
3838
line-index = "0.1.2"
39+
serde-wasm-bindgen = "0.6.5"
40+
wasm-bindgen = "0.2.100"
41+
wasm-bindgen-test = "0.3.34"
42+
web-sys = "0.3.77"
43+
console_error_panic_hook = "0.1.7"
44+
console_log = "1.0.0"
3945

4046
# local
4147
squawk-parser = { version = "0.0.0", path = "./crates/parser" }
@@ -44,6 +50,7 @@ squawk-github = { version = "0.0.0", path = "./crates/github" }
4450
squawk_lexer = { version = "0.0.0", path = "./crates/squawk_lexer" }
4551
squawk_parser = { version = "0.0.0", path = "./crates/squawk_parser" }
4652
squawk_syntax = { version = "0.0.0", path = "./crates/squawk_syntax" }
53+
squawk_linter = { version = "0.0.0", path = "./crates/squawk_linter" }
4754

4855
[workspace.lints.clippy]
4956
collapsible_else_if = "allow"

crates/squawk_wasm/Cargo.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[package]
2+
name = "squawk_wasm"
3+
version = "0.1.0"
4+
edition.workspace = true
5+
rust-version.workspace = true
6+
authors.workspace = true
7+
license.workspace = true
8+
9+
[lib]
10+
crate-type = ["cdylib", "rlib"]
11+
12+
[features]
13+
default = ["console_error_panic_hook"]
14+
15+
[dependencies]
16+
17+
squawk_syntax.workspace = true
18+
squawk_linter.workspace = true
19+
squawk_lexer.workspace = true
20+
21+
wasm-bindgen.workspace = true
22+
serde-wasm-bindgen.workspace = true
23+
serde.workspace = true
24+
console_error_panic_hook = { workspace = true, optional = true }
25+
web-sys = { workspace = true, features = ["Window"] }
26+
console_log.workspace = true
27+
log.workspace = true
28+
line-index.workspace = true
29+
30+
[dev-dependencies]
31+
wasm-bindgen-test.workspace = true
32+
33+
[lints]
34+
workspace = true

crates/squawk_wasm/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# squak_wasm
2+
3+
```shell
4+
wasm-pack build --target web crates/squawk_wasm
5+
```

0 commit comments

Comments
 (0)