Cargo Features
[dependencies]
napi = { version = "3.0.0-alpha.20", default-features = false, features = ["async", "chrono_date", "compat-mode", "full", "deferred_trace", "error_anyhow", "experimental", "object_indexmap", "latin1", "napi1", "napi2", "napi3", "napi4", "napi5", "napi6", "napi7", "napi8", "napi9", "noop", "serde-json", "serde-json-ordered", "tokio_fs", "tokio_full", "tokio_io_std", "tokio_io_util", "tokio_macros", "tokio_net", "tokio_process", "tokio_rt", "tokio_signal", "tokio_sync", "tokio_test_util", "tokio_time", "dyn-symbols"] }
- async full? = tokio_rt
- chrono_date full? = chrono, napi5
- compat-mode default
-
Affects
module_register::register_module_exports
… - default = compat-mode, napi3
-
for most Node.js users
- full = async, chrono_date, experimental, latin1, napi9, serde-json
- deferred_trace = napi4
- error_anyhow = anyhow
- experimental full?
-
Enables experimental of napi-sys
- object_indexmap = indexmap
- latin1 full? = encoding_rs
- napi1 napi2?
- napi2 napi3 = napi1
- napi3 default napi4? = napi2
- napi4 deferred_trace? napi5? tokio_rt? = napi3
-
Affects
function::ThreadsafeFunctionBuilder
,napi::threadsafe_function
… - napi5 chrono_date? napi6? = napi4
-
Affects
object::FinalizeContext
,object_property::PropertyClosures
… - napi6 napi7? = napi5
-
Affects
object::KeyCollectionMode
,object::KeyFilter
,object::KeyConversion
… - napi7 napi8? = napi6
- napi8 napi9? = napi7
- napi9 full? = napi8
-
Affects
error::JsSyntaxError
… - noop
- serde-json full? serde-json-ordered? = serde, serde_json
- serde-json-ordered = serde-json
-
Enables preserve_order of serde_json
serde_json:
Make serde_json::Map use a representation which maintains insertion order.
This allows data to be read into a Value and written back to a JSON string while preserving the order of map keys in the input. - tokio_fs
- tokio_full
-
tokio:
enable everything
- tokio_io_std
-
tokio:
stdin, stdout, stderr
- tokio_io_util
- tokio_macros
- tokio_net
- tokio_process
- tokio_rt async? = napi4, tokio
- tokio_signal
- tokio_sync
-
Enables tokio
- tokio_test_util
- tokio_time
- dyn-symbols
-
Enables dyn-symbols of napi-sys
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
- anyhow error_anyhow?
- chrono chrono_date?
- encoding_rs latin1?
- indexmap object_indexmap?
- serde serde-json?
- serde_json serde-json? serde-json-ordered?
- tokio wasm not wasm tokio_fs? tokio_full? tokio_io_std? tokio_io_util? tokio_macros? tokio_net? tokio_process? tokio_rt? tokio_signal? tokio_sync? tokio_test_util? tokio_time?