napi-rs/crates/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

95 lines
2.3 KiB
TOML

[package]
authors = ["Nathan Sobo <nathan@github.com>", "Yinan Long <lynweklm@gmail.com>"]
description = "N-API bindings"
edition = "2021"
keywords = ["NodeJS", "Node", "FFI", "NAPI", "n-api"]
license = "MIT"
name = "napi"
readme = "README.md"
repository = "https://github.com/napi-rs/napi-rs"
rust-version = "1.65"
version = "2.13.3"
[lib]
doctest = false
[package.metadata.docs.rs]
all-features = true
[package.metadata.workspaces]
independent = true
[features]
noop = []
async = ["tokio_rt"]
compat-mode = []
default = ["napi3", "compat-mode"] # for most Node.js users
experimental = ["napi-sys/experimental"]
chrono_date = ["chrono", "napi5"]
full = ["latin1", "napi9", "async", "serde-json", "experimental", "chrono_date"]
latin1 = ["encoding_rs"]
error_anyhow = ["anyhow"]
napi1 = []
napi2 = ["napi1", "napi-sys/napi2"]
napi3 = ["napi2", "napi-sys/napi3"]
napi4 = ["napi3", "napi-sys/napi4"]
napi5 = ["napi4", "napi-sys/napi5"]
napi6 = ["napi5", "napi-sys/napi6"]
napi7 = ["napi6", "napi-sys/napi7"]
napi8 = ["napi7", "napi-sys/napi8"]
napi9 = ["napi8", "napi-sys/napi9"]
serde-json = ["serde", "serde_json"]
tokio_fs = ["tokio/fs"]
tokio_full = ["tokio/full"]
tokio_io_std = ["tokio/io-std"]
tokio_io_util = ["tokio/io-util"]
tokio_macros = ["tokio/macros"]
tokio_net = ["tokio/net"]
tokio_process = ["tokio/process"]
tokio_rt = ["tokio", "napi4"]
tokio_signal = ["tokio/signal"]
tokio_stats = ["tokio/stats"]
tokio_sync = ["tokio/sync"]
tokio_test_util = ["tokio/test-util"]
tokio_time = ["tokio/time"]
deferred_trace = ["napi4"]
[dependencies]
ctor = "0.2"
once_cell = "1.16"
bitflags = "2"
[dependencies.anyhow]
version = "1"
optional = true
[dependencies.napi-sys]
version = "2.2.3"
path = "../sys"
[dependencies.encoding_rs]
optional = true
version = "0.8"
[dependencies.chrono]
optional = true
version = "0.4"
[target.'cfg(target_os = "wasi")'.dependencies]
tokio = { version = "1", optional = true, features = ["rt", "sync"] }
napi-derive = { path = "../macro", version = "2.10.1", default-features = false }
[target.'cfg(not(target_os = "wasi"))'.dependencies]
tokio = { version = "1", optional = true, features = [
"rt",
"rt-multi-thread",
"sync",
] }
[dependencies.serde]
optional = true
version = "1"
[dependencies.serde_json]
optional = true
version = "1"