Cargo Features
[dependencies]
napi = { version = "3.5.1", 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", "napi10", "web_stream", "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", "node_version_detect"] }
- async full? = tokio_rt
- chrono_date full? = chrono, napi5
- compat-mode
-
Enable deprecated types and traits for compatibility
Affects
module_register::register_module_exports,js_values::NapiRaw,js_values::NapiValue,null::JsNull… - default = napi4
-
The
napi4feature is set by default whenevernapiis added withoutsomewhere in the dependency tree.default-features = false - full = async, chrono_date, experimental, latin1, napi10, 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 napi4 = napi2
- napi4 default deferred_trace? napi5? tokio_rt? web_stream? = napi3
-
Affects
function::ThreadsafeFunctionBuilder,napi::threadsafe_function… - napi5 chrono_date? napi6? = napi4
-
Affects
object::JsObjectValue.add_finalizer,object::FinalizeContext,object_property::PropertyClosures,value::JsValue.is_date… - napi6 napi7? = napi5
-
Affects
object::JsObjectValue.get_all_property_names,object::KeyCollectionMode,object::KeyFilter,object::KeyConversion… - napi7 napi8? = napi6
- napi8 napi9? = napi7
-
Affects
object::JsObjectValue.freeze,object::JsObjectValue.seal… - napi9 napi10? = napi8
-
Affects
error::JsSyntaxError… - napi10 full? = napi9
- web_stream = futures-core, napi4, tokio-stream, tokio_rt
- noop
-
Affects
module_register::register_module_exports,module_register::register_module_export,module_register::register_module_export_hook,module_register::register_class,tokio_runtime::create_custom_tokio_runtime,tokio_runtime::block_on,tokio_runtime::within_runtime_if_available,tokio_runtime::execute_tokio_future… - 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? web_stream? = napi4, tokio
-
Affects
bindgen_runtime::async_iterator… - tokio_signal
- tokio_sync
-
Enables tokio
- tokio_test_util
- tokio_time
- dyn-symbols
-
Enables dyn-symbols of napi-sys
napi-sys:
Deprecated feature
- node_version_detect
-
Add a runtime Node version detection
Affects
module_register::NODE_VERSION_MAJOR,module_register::NODE_VERSION_MINOR,module_register::NODE_VERSION_PATCH…
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?
- futures-core web_stream?
- indexmap object_indexmap?
- serde serde-json?
- tokio-stream web_stream?
- serde_json serde-json? serde-json-ordered?
- tokio wasm tokio_unstable not wasm wasm not tokio_unstable 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?