Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.88"
name = "napi"
version = "3.8.3"
authors = [
    "Nathan Sobo <nathan@github.com>",
    "Yinan Long <lynweklm@gmail.com>",
]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "N-API bindings"
readme = "README.md"
keywords = [
    "NodeJS",
    "Node",
    "FFI",
    "NAPI",
    "n-api",
]
license = "MIT"
repository = "https://github.com/napi-rs/napi-rs"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[package.metadata.workspaces]
independent = true

[features]
async = ["tokio_rt"]
chrono_date = [
    "chrono",
    "napi5",
]
compat-mode = []
default = [
    "napi4",
    "dyn-symbols",
]
deferred_trace = ["napi4"]
dyn-symbols = ["napi-sys/dyn-symbols"]
error_anyhow = ["anyhow"]
experimental = ["napi-sys/experimental"]
full = [
    "latin1",
    "napi10",
    "async",
    "serde-json",
    "experimental",
    "chrono_date",
]
latin1 = ["encoding_rs"]
napi1 = []
napi10 = [
    "napi9",
    "napi-sys/napi10",
]
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",
]
node_version_detect = []
noop = []
object_indexmap = ["indexmap"]
serde-json = [
    "serde",
    "serde_json",
]
serde-json-ordered = [
    "serde-json",
    "serde_json/preserve_order",
]
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_sync = ["tokio/sync"]
tokio_test_util = ["tokio/test-util"]
tokio_time = ["tokio/time"]
tracing = ["dep:tracing"]
web_stream = [
    "futures-core",
    "tokio-stream",
    "napi4",
    "tokio_rt",
]

[lib]
name = "napi"
path = "src/lib.rs"
doctest = false

[dependencies.anyhow]
version = "1"
optional = true

[dependencies.bitflags]
version = "2"

[dependencies.chrono]
version = "0.4"
optional = true

[dependencies.ctor]
version = "0.6.0"

[dependencies.encoding_rs]
version = "0.8"
optional = true

[dependencies.futures]
version = "0.3"

[dependencies.futures-core]
version = "0.3"
optional = true

[dependencies.indexmap]
version = "2"
optional = true

[dependencies.napi-sys]
version = "3.2.1"
default-features = false

[dependencies.nohash-hasher]
version = "0.2.0"

[dependencies.rustc-hash]
version = "2.1.1"

[dependencies.serde]
version = "1"
optional = true

[dependencies.serde_json]
version = "1"
optional = true

[dependencies.tokio-stream]
version = "0.1"
optional = true

[dependencies.tracing]
version = "0.1"
optional = true

[build-dependencies.napi-build]
version = "2.3.1"

[target.'cfg(all(target_family = "wasm", not(tokio_unstable)))'.dependencies.tokio]
version = "1"
features = [
    "rt",
    "sync",
]
optional = true

[target.'cfg(any(all(target_family = "wasm", tokio_unstable), not(target_family = "wasm")))'.dependencies.tokio]
version = "1"
features = [
    "rt",
    "rt-multi-thread",
    "sync",
]
optional = true