Skip to content

Commit

Permalink
feat(core): import wasm file
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Nov 24, 2024
1 parent 5375275 commit 2426615
Show file tree
Hide file tree
Showing 20 changed files with 854 additions and 79 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
179 changes: 174 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 29 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[workspace]
members = [".", "packages/ts-wasm-language-service"]

[package]
authors = ["LongYinan <[email protected]>"]
edition = "2021"
Expand All @@ -7,25 +10,39 @@ version = "0.0.0"
[lib]
crate-type = ["cdylib"]

[workspace.dependencies]
mimalloc = "0.1"
napi = { version = "3.0.0-alpha", default-features = false, features = ["serde-json", "napi3"] }
napi-build = "2"
napi-derive = { version = "3.0.0-alpha", default-features = false, features = ["type-def"] }
oxc = { version = "0.37", features = ["codegen", "transformer", "sourcemap_concurrent", "semantic"] }
oxc_resolver = "2"
phf = "0.11"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", default-features = false, features = ["std", "fmt"] }
walrus = "0.23"

[dependencies]
napi = { version = "3.0.0-alpha", default-features = false, features = ["serde-json", "napi3"] }
napi-derive = { version = "3.0.0-alpha", default-features = false, features = ["type-def"] }
oxc = { version = "0.37", features = ["codegen", "transformer", "sourcemap_concurrent", "semantic"] }
oxc_resolver = "2"
phf = "0.11"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", default-features = false, features = ["std", "fmt"] } # Omit the `regex` feature
napi = { workspace = true }
napi-derive = { workspace = true }
oxc = { workspace = true }
oxc_resolver = { workspace = true }
phf = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true } # Omit the `regex` feature

[target.'cfg(all(not(target_os = "linux"), not(target_family = "wasm")))'.dependencies]
mimalloc = "0.1"
mimalloc = { workspace = true }

[target.'cfg(all(target_os = "linux", not(target_arch = "arm")))'.dependencies]
mimalloc = { version = "0.1", features = ["local_dynamic_tls"] }
mimalloc = { workspace = true, features = ["local_dynamic_tls"] }

[build-dependencies]
napi-build = "2"
napi-build = { workspace = true }

[profile.release]
codegen-units = 1
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@napi-rs/wasm-runtime": "^0.2.5",
"@oxc-node/cli": "workspace:*",
"@oxc-node/core": "workspace:*",
"@oxc-node/ts-wasm-language-service": "workspace:*",
"@taplo/cli": "^0.7.0",
"@types/node": "^22.9.3",
"ava": "^6.2.0",
Expand All @@ -23,6 +24,7 @@
},
"scripts": {
"bench": "pnpm --filter=bench bench",
"build:ts": "tsc -b ./tsconfig.json",
"format": "taplo fmt && prettier --write . && cargo fmt",
"lint": "oxlint",
"test": "pnpm --sequential --filter=integrate* run test",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"@oxc-node/core": "workspace:*"
},
"devDependencies": {
"clipanion": "^4.0.0-rc.3",
"rolldown": "^0.13.0"
"clipanion": "^4.0.0-rc.4",
"rolldown": "^0.14.0"
},
"files": [
"dist"
Expand Down
1 change: 1 addition & 0 deletions packages/integrate-module/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!src/add.wasm
Binary file added packages/integrate-module/src/add.wasm
Binary file not shown.
Loading

0 comments on commit 2426615

Please sign in to comment.