Skip to content

Commit

Permalink
build(cargo): controllable default napi version features
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Feb 23, 2024
1 parent db5a8ed commit 6e3030b
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 3 deletions.
96 changes: 95 additions & 1 deletion Cargo.lock

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

13 changes: 11 additions & 2 deletions napi/Cargo.toml
Expand Up @@ -8,7 +8,16 @@ repository = "https://github.com/parcel-bundler/lightningcss"
edition = "2021"

[features]
default = []
default = [
"napi",
"napi/napi4",
"napi/napi5",
"napi/compat-mode",
"napi/serde-json",
]

napi = ["dep:napi"]
napi_tokio_rt = ["napi/tokio_rt"]
visitor = ["lightningcss/visitor"]
bundler = ["dep:crossbeam-channel", "dep:rayon"]

Expand All @@ -20,6 +29,6 @@ lightningcss = { path = "../", features = ["nodejs", "serde"] }
parcel_sourcemap = { version = "2.1.1", features = ["json"] }
serde-detach = "0.0.1"
smallvec = { version = "1.7.0", features = ["union"] }
napi = {version = "=2.10.3", default-features = false, features = ["napi4", "napi5", "compat-mode", "serde-json"]}
napi = {version = "2", default-features = false, optional = true}
crossbeam-channel = { version = "0.5.6", optional = true }
rayon = { version = "1.5.1", optional = true }

0 comments on commit 6e3030b

Please sign in to comment.