Cargo Features

[dependencies]
napi-ohos = { version = "1.0.3", default-features = false, features = ["full", "async", "chrono_date", "compat-mode", "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", "tokio_tracing", "dyn-symbols", "node_version_detect"] }
default = compat-mode, napi4

These default features are set whenever napi-ohos is added without default-features = false somewhere in the dependency tree.

full = async, chrono_date, latin1, serde-json
async full? = tokio_rt
chrono_date full? = chrono, napi5
compat-mode default

Affects module_register::register_module_exports

deferred_trace = napi4
error_anyhow = anyhow
experimental

Enables experimental of napi-sys-ohos

object_indexmap = indexmap
latin1 full? = encoding_rs
napi1 napi2?
napi2 napi3? = napi1

Enables napi2 of napi-sys-ohos

napi3 napi4 = napi2

Enables napi3 of napi-sys-ohos

napi4 default deferred_trace? napi5? tokio_rt? = napi3

Enables napi4 of napi-sys-ohos

Affects function::ThreadsafeFunctionBuilder, napi-ohos::threadsafe_function

napi5 chrono_date? napi6? = napi4

Enables napi5 of napi-sys-ohos

Affects object::FinalizeContext, object_property::PropertyClosures

napi6 napi7? = napi5

Enables napi6 of napi-sys-ohos

Affects object::KeyCollectionMode, object::KeyFilter, object::KeyConversion

napi7 napi8? = napi6

Enables napi7 of napi-sys-ohos

napi8 napi9? = napi7

Enables napi8 of napi-sys-ohos

napi9 = napi8

Enables napi9 of napi-sys-ohos

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

Enables fs of tokio

tokio_full

Enables full of tokio

tokio:

enable everything

tokio_io_std

Enables io-std of tokio

tokio:

stdin, stdout, stderr

tokio_io_util

Enables io-util of tokio

tokio_macros

Enables macros of tokio

tokio_net

Enables net of tokio

tokio_process

Enables process of tokio

tokio_rt async? = napi4, tokio
tokio_signal

Enables signal of tokio

tokio_sync

Enables tokio

tokio_test_util

Enables test-util of tokio

tokio_time

Enables time of tokio

tokio_tracing

Enables tracing of tokio

dyn-symbols

Enables dyn-symbols of napi-sys-ohos

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?
indexmap object_indexmap?
serde serde-json?
serde_json serde-json? serde-json-ordered?
tokio 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? tokio_tracing?