Skip to content

Commit

Permalink
chore: use cargo workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
xusd320 committed Jul 18, 2024
1 parent 7e7e860 commit b41e366
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

20 changes: 2 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
[package]
edition = "2021"
name = "niddle"
version = "0.0.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
html5ever = "0.27.0"
indexmap = { version = "2.2.6", default-features = false, falsefeatures = ["rayon"] }
kuchikiki = { git = "https://github.com/brave/kuchikiki.git", rev = "28e1ec0" }
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
napi = { version = "3.0.0-alpha.7", default-features = false, features = ["object_indexmap"] }
napi-derive = "3.0.0-alpha.6"

[build-dependencies]
napi-build = "2.1.3"
[workspace]
members = ["crates/*"]

[profile.release]
lto = true
Expand Down
18 changes: 18 additions & 0 deletions crates/niddle_napi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
edition = "2021"
name = "niddle_napi"
version = "0.0.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
html5ever = "0.27.0"
indexmap = { version = "2.2.6", default-features = false, falsefeatures = ["rayon"] }
kuchikiki = { git = "https://github.com/brave/kuchikiki.git", rev = "28e1ec0" }
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
napi = { version = "3.0.0-alpha.7", default-features = false, features = ["object_indexmap"] }
napi-derive = "3.0.0-alpha.6"

[build-dependencies]
napi-build = "2.1.3"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
},
"scripts": {
"artifacts": "napi artifacts",
"build": "napi build --platform --release",
"build:debug": "napi build --platform",
"build": "napi build --platform --release --cargo-name niddle_napi",
"build:debug": "napi build --platform --cargo-name niddle_napi",
"prepublishOnly": "yarn patchdts && napi prepublish -t npm",
"universal": "napi universal",
"version": "napi version",
Expand Down

0 comments on commit b41e366

Please sign in to comment.