| 1 | [package] |
| 2 | authors = ["Nathan Sobo <nathan@github.com>" , "Yinan Long <lynweklm@gmail.com>" ] |
| 3 | description = "N-API bindings" |
| 4 | edition = "2021" |
| 5 | keywords = ["NodeJS" , "Node" , "FFI" , "NAPI" , "n-api" ] |
| 6 | license = "MIT" |
| 7 | name = "napi" |
| 8 | readme = "README.md" |
| 9 | repository = "https://github.com/napi-rs/napi-rs" |
| 10 | rust-version = "1.65" |
| 11 | version = "2.16.17" |
| 12 | |
| 13 | [lib] |
| 14 | doctest = false |
| 15 | |
| 16 | [package.metadata.docs.rs] |
| 17 | all-features = true |
| 18 | rustdoc-args = ["--cfg" , "docsrs" ] |
| 19 | |
| 20 | [package.metadata.workspaces] |
| 21 | independent = true |
| 22 | |
| 23 | [features] |
| 24 | async = ["tokio_rt" ] |
| 25 | chrono_date = ["chrono" , "napi5" ] |
| 26 | compat-mode = [] |
| 27 | default = ["napi3" , "compat-mode" ] # for most Node.js users |
| 28 | deferred_trace = ["napi4" ] |
| 29 | error_anyhow = ["anyhow" ] |
| 30 | experimental = ["napi-sys/experimental" ] |
| 31 | full = ["latin1" , "napi9" , "async" , "serde-json" , "experimental" , "chrono_date" ] |
| 32 | object_indexmap = ["indexmap" ] |
| 33 | latin1 = ["encoding_rs" ] |
| 34 | napi1 = [] |
| 35 | napi2 = ["napi1" , "napi-sys/napi2" ] |
| 36 | napi3 = ["napi2" , "napi-sys/napi3" ] |
| 37 | napi4 = ["napi3" , "napi-sys/napi4" ] |
| 38 | napi5 = ["napi4" , "napi-sys/napi5" ] |
| 39 | napi6 = ["napi5" , "napi-sys/napi6" ] |
| 40 | napi7 = ["napi6" , "napi-sys/napi7" ] |
| 41 | napi8 = ["napi7" , "napi-sys/napi8" ] |
| 42 | napi9 = ["napi8" , "napi-sys/napi9" ] |
| 43 | noop = [] |
| 44 | serde-json = ["serde" , "serde_json" ] |
| 45 | serde-json-ordered = ["serde-json" , "serde_json/preserve_order" ] |
| 46 | tokio_fs = ["tokio/fs" ] |
| 47 | tokio_full = ["tokio/full" ] |
| 48 | tokio_io_std = ["tokio/io-std" ] |
| 49 | tokio_io_util = ["tokio/io-util" ] |
| 50 | tokio_macros = ["tokio/macros" ] |
| 51 | tokio_net = ["tokio/net" ] |
| 52 | tokio_process = ["tokio/process" ] |
| 53 | tokio_rt = ["tokio" , "napi4" ] |
| 54 | tokio_signal = ["tokio/signal" ] |
| 55 | tokio_sync = ["tokio/sync" ] |
| 56 | tokio_test_util = ["tokio/test-util" ] |
| 57 | tokio_time = ["tokio/time" ] |
| 58 | dyn-symbols = ["napi-sys/dyn-symbols" ] |
| 59 | |
| 60 | [dependencies] |
| 61 | bitflags = "2" |
| 62 | ctor = "0.2" |
| 63 | once_cell = "1.19" |
| 64 | |
| 65 | [dependencies.anyhow] |
| 66 | optional = true |
| 67 | version = "1" |
| 68 | |
| 69 | [dependencies.napi-sys] |
| 70 | path = "../sys" |
| 71 | version = "2.4.0" |
| 72 | |
| 73 | [dependencies.encoding_rs] |
| 74 | optional = true |
| 75 | version = "0.8" |
| 76 | |
| 77 | [dependencies.chrono] |
| 78 | optional = true |
| 79 | version = "0.4" |
| 80 | |
| 81 | [target.'cfg(target_family = "wasm")'.dependencies] |
| 82 | napi-derive = { path = "../macro" , version = "2.10.1" , default-features = false } |
| 83 | tokio = { version = "1" , optional = true, features = ["rt" , "sync" ] } |
| 84 | |
| 85 | [target.'cfg(not(target_family = "wasm"))'.dependencies] |
| 86 | tokio = { version = "1" , optional = true, features = [ |
| 87 | "rt" , |
| 88 | "rt-multi-thread" , |
| 89 | "sync" , |
| 90 | ] } |
| 91 | |
| 92 | [dependencies.serde] |
| 93 | optional = true |
| 94 | version = "1" |
| 95 | |
| 96 | [dependencies.serde_json] |
| 97 | optional = true |
| 98 | version = "1" |
| 99 | |
| 100 | [dependencies.indexmap] |
| 101 | optional = true |
| 102 | version = "2" |
| 103 | |