Cargo Features
[dependencies]
ender = { version = "0.2.0", default-features = false, features = ["debug", "all", "alloc", "std", "serde", "derive", "unstable"] }
- default = std
-
The
std
feature is set by default wheneverender
is added without
somewhere in the dependency tree.default-features = false - debug
-
Keeps track of the various structures being encoded/decoded to provide better information when debugging a binary format. This probably prevents some optimizations on release mode,
so use this ONLY in executables, NEVER in libraries.Enables debug of ender-derive
Affects
ender::Encoder.stack
… - all = alloc, derive, serde, std
-
Enables all features. Includes serde support, encryption and compression, and the derive macros.
The unstable feature still has to be enabled separately. - alloc all? std
-
Imports the alloc crate, enabling some additional features and Encode/Decode implementations,
at the cost of portabilityEnables alloc of embedded-io and optional serde
serde:
serde feature
Affects
convenience::encode_bytes
,convenience::encode_bytes_with
,io::VecStream
… - std default all? = alloc
-
Imports the std crate, enabling some additional features and Encode/Decode implementations,
at the cost of portabilityEnables std of embedded-io and optional serde
Affects
io::Std
… - serde all?
-
Enables the serde compatibility layer.
Enables serde
- derive all? = ender-derive
-
Enables the derive(Encode, Decode) macros.
- unstable
-
Enables features only available in nightly.
Enables unstable of ender-derive
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.