napi-rs/examples/napi/Cargo.toml
LongYinan 13d0ce075e
feat: integrate with emnapi (#1669)
* Integrate with emnapi

* resolve conflict

* ignore wasm

* generate wasi file

* Add wasi test to workflow

* Fix wasi template

* emnapi new initialize api

* Finish test

* Purne tsconfig

* Generate wasi worker

* Fix electron test

* Finalize check

* Noop adjust_external_memory

* Apply cr suggestions
2023-11-02 12:57:11 +08:00

64 lines
1.3 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"]
[dependencies]
chrono = "0.4"
futures = "0.3"
napi-derive = { path = "../../crates/macro", features = ["type-def"] }
napi-shared = { path = "../napi-shared" }
serde = "1"
serde_derive = "1"
serde_json = "1"
[target.'cfg(not(target_os = "wasi"))'.dependencies]
napi = { path = "../../crates/napi", default-features = false, features = [
"napi9",
"serde-json",
"experimental",
"latin1",
"chrono_date",
"tokio",
"async",
"tokio_rt",
"tokio_fs",
"tokio_macros",
"deferred_trace",
] }
tokio = { version = "1", features = ["rt", "time"] }
[target.'cfg(target_os = "wasi")'.dependencies]
napi = { path = "../../crates/napi", default-features = false, features = [
"napi9",
"serde-json",
"experimental",
"latin1",
"chrono_date",
"tokio",
"async",
"tokio_rt",
"tokio_macros",
"tokio_sync",
"deferred_trace",
] }
tokio = { version = "1", default-features = false, features = ["rt", "time"] }
[dependencies.snmalloc-rs]
version = "0.3"
features = ["build_cc", "local_dynamic_tls"]
optional = true
[build-dependencies]
napi-build = { path = "../../crates/build" }
[dev-dependencies]
trybuild = "1.0"