2020-02-18 21:09:17 +08:00
|
|
|
[package]
|
|
|
|
authors = ["Nathan Sobo <nathan@github.com>", "Yinan Long <lynweklm@gmail.com>"]
|
2020-03-16 14:26:30 +08:00
|
|
|
description = "N-API bindings"
|
2021-12-08 12:52:33 +08:00
|
|
|
edition = "2021"
|
2021-03-31 21:51:12 +08:00
|
|
|
keywords = ["NodeJS", "Node", "FFI", "NAPI", "n-api"]
|
2020-10-11 21:36:14 +08:00
|
|
|
license = "MIT"
|
|
|
|
name = "napi"
|
2020-03-16 14:26:30 +08:00
|
|
|
readme = "README.md"
|
2020-07-15 01:23:23 +08:00
|
|
|
repository = "https://github.com/napi-rs/napi-rs"
|
2023-10-17 20:18:29 +08:00
|
|
|
rust-version = "1.65"
|
2024-04-15 23:59:37 +08:00
|
|
|
version = "3.0.0-alpha.2"
|
2021-12-22 00:19:07 +08:00
|
|
|
|
2023-04-06 11:04:53 +08:00
|
|
|
[lib]
|
|
|
|
doctest = false
|
|
|
|
|
2021-12-22 00:19:07 +08:00
|
|
|
[package.metadata.docs.rs]
|
|
|
|
all-features = true
|
|
|
|
|
|
|
|
[package.metadata.workspaces]
|
|
|
|
independent = true
|
2020-02-18 21:09:17 +08:00
|
|
|
|
2020-07-03 00:31:50 +08:00
|
|
|
[features]
|
2021-10-31 23:35:39 +08:00
|
|
|
async = ["tokio_rt"]
|
2023-11-06 11:01:27 +08:00
|
|
|
chrono_date = ["chrono", "napi5"]
|
2021-09-23 01:29:09 +08:00
|
|
|
compat-mode = []
|
2022-02-09 20:50:46 +01:00
|
|
|
default = ["napi3", "compat-mode"] # for most Node.js users
|
2023-11-06 11:01:27 +08:00
|
|
|
deferred_trace = ["napi4"]
|
|
|
|
error_anyhow = ["anyhow"]
|
2021-12-07 23:38:53 +08:00
|
|
|
experimental = ["napi-sys/experimental"]
|
2023-09-14 00:45:14 +02:00
|
|
|
full = ["latin1", "napi9", "async", "serde-json", "experimental", "chrono_date"]
|
2024-02-15 15:43:21 +08:00
|
|
|
object_indexmap = ["indexmap"]
|
2020-10-11 21:36:14 +08:00
|
|
|
latin1 = ["encoding_rs"]
|
2020-11-10 11:09:25 +08:00
|
|
|
napi1 = []
|
2022-10-02 13:52:17 +08:00
|
|
|
napi2 = ["napi1", "napi-sys/napi2"]
|
2020-11-10 11:09:25 +08:00
|
|
|
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"]
|
2021-04-21 17:19:45 +08:00
|
|
|
napi8 = ["napi7", "napi-sys/napi8"]
|
2023-11-06 11:03:44 +08:00
|
|
|
napi9 = ["napi8", "napi-sys/napi9"]
|
2023-11-06 11:01:27 +08:00
|
|
|
noop = []
|
2020-08-26 00:07:27 +08:00
|
|
|
serde-json = ["serde", "serde_json"]
|
2024-02-15 15:43:21 +08:00
|
|
|
serde-json-ordered = ["serde-json", "serde_json/preserve_order"]
|
2022-01-23 18:43:37 +08:00
|
|
|
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"]
|
2021-12-21 23:24:07 +08:00
|
|
|
tokio_rt = ["tokio", "napi4"]
|
2022-01-23 18:43:37 +08:00
|
|
|
tokio_signal = ["tokio/signal"]
|
|
|
|
tokio_stats = ["tokio/stats"]
|
|
|
|
tokio_sync = ["tokio/sync"]
|
|
|
|
tokio_test_util = ["tokio/test-util"]
|
|
|
|
tokio_time = ["tokio/time"]
|
2024-03-27 14:35:16 +08:00
|
|
|
dyn-symbols = ["napi-sys/dyn-symbols"]
|
2020-07-08 00:59:09 +08:00
|
|
|
|
2020-07-15 00:43:20 +08:00
|
|
|
[dependencies]
|
2023-11-06 11:01:27 +08:00
|
|
|
bitflags = "2"
|
2023-04-11 11:44:10 +08:00
|
|
|
ctor = "0.2"
|
2023-12-07 22:23:43 +08:00
|
|
|
once_cell = "1.19"
|
2022-05-06 21:16:35 +08:00
|
|
|
|
2022-08-14 08:03:31 +08:00
|
|
|
[dependencies.anyhow]
|
|
|
|
optional = true
|
2023-11-06 11:01:27 +08:00
|
|
|
version = "1"
|
2022-08-14 08:03:31 +08:00
|
|
|
|
2022-05-06 21:16:35 +08:00
|
|
|
[dependencies.napi-sys]
|
|
|
|
path = "../sys"
|
2024-04-10 16:57:51 +08:00
|
|
|
version = "2.4.0"
|
2020-07-15 00:43:20 +08:00
|
|
|
|
2020-09-03 19:11:30 +08:00
|
|
|
[dependencies.encoding_rs]
|
|
|
|
optional = true
|
2020-10-11 21:36:14 +08:00
|
|
|
version = "0.8"
|
2020-09-03 19:11:30 +08:00
|
|
|
|
2022-02-09 20:50:46 +01:00
|
|
|
[dependencies.chrono]
|
|
|
|
optional = true
|
|
|
|
version = "0.4"
|
|
|
|
|
2023-11-20 17:10:58 +08:00
|
|
|
[target.'cfg(target_family = "wasm")'.dependencies]
|
2023-11-06 11:01:27 +08:00
|
|
|
tokio = { version = "1", optional = true, features = ["rt", "sync"] }
|
2023-03-20 18:42:27 +08:00
|
|
|
|
2023-11-20 17:10:58 +08:00
|
|
|
[target.'cfg(not(target_family = "wasm"))'.dependencies]
|
2023-03-20 18:42:27 +08:00
|
|
|
tokio = { version = "1", optional = true, features = [
|
|
|
|
"rt",
|
|
|
|
"rt-multi-thread",
|
|
|
|
"sync",
|
|
|
|
] }
|
2020-07-08 00:59:09 +08:00
|
|
|
|
2020-08-26 00:07:27 +08:00
|
|
|
[dependencies.serde]
|
|
|
|
optional = true
|
2020-10-11 21:36:14 +08:00
|
|
|
version = "1"
|
2020-08-26 00:07:27 +08:00
|
|
|
|
|
|
|
[dependencies.serde_json]
|
|
|
|
optional = true
|
2020-10-11 21:36:14 +08:00
|
|
|
version = "1"
|
2024-02-15 15:43:21 +08:00
|
|
|
|
|
|
|
[dependencies.indexmap]
|
|
|
|
optional = true
|
|
|
|
version = "2"
|