napi-rs/examples/napi/Cargo.toml
2025-10-05 19:35:20 +08:00

74 lines
1.6 KiB
TOML

[package]
authors = ["LongYinan <lynweklm@gmail.com>"]
edition = "2021"
name = "napi-examples"
publish = false
version = "0.1.0"
[lib]
crate-type = ["cdylib"]
[features]
snmalloc = ["snmalloc-rs"]
mimalloc = ["mimalloc-safe"]
dyn-symbols = ["napi/dyn-symbols"]
error_try_builds = []
noop = ["napi/noop"]
cfg_attr_napi = [
] # for testing cfg_attr(not(feature = "noop"), napi_derive::napi) attribute
[dependencies]
anyhow = "1"
chrono = "0.4"
futures = "0.3"
bytes = "1"
napi-derive = { path = "../../crates/macro", features = ["type-def"] }
napi-shared = { path = "../napi-shared" }
serde = "1"
serde_bytes = "0.11"
serde_derive = "1"
serde_json = "1"
indexmap = "2"
rustc-hash = "2"
tokio-stream = "0.1"
tokio-util = { version = "0.7", features = ["io"] }
napi = { path = "../../crates/napi", default-features = false, features = [
"napi10",
"serde-json",
"experimental",
"latin1",
"chrono_date",
"object_indexmap",
"tokio",
"async",
"tokio_rt",
"tokio_macros",
"tokio_io_util",
"deferred_trace",
"node_version_detect",
"web_stream",
"error_anyhow",
] }
[target.'cfg(target_family = "wasm")'.dependencies]
tokio = { version = "1", features = ["rt", "time"] }
[target.'cfg(not(target_family = "wasm"))'.dependencies]
tokio = { version = "1", features = ["rt", "time", "fs"] }
[dependencies.snmalloc-rs]
version = "0.3"
features = ["build_cc", "local_dynamic_tls"]
optional = true
[dependencies.mimalloc-safe]
version = "0.1"
optional = true
features = ["skip_collect_on_exit"]
[build-dependencies]
napi-build = { path = "../../crates/build" }
[dev-dependencies]
trybuild = "1.0"