Cargo Features
[dependencies]
bilrost = { version = "0.1011.1", default-features = false, features = ["std", "derive", "detailed-errors", "extended-diagnostics", "no-recursion-limit", "third-party-type-support", "arrayvec", "bstr", "bytestring", "chrono", "hashbrown", "smallvec", "thin-vec", "time", "tinyvec", "auto-optimize", "auto-self-copy-optimization", "self-copy-optimization", "auto-unroll-varint-encoding", "unroll-varint-encoding", "full-test-suite", "test-suite-extra", "pprof"] }
- default = auto-optimize, derive, detailed-errors, std
-
These default features are set whenever
bilrost
is added without
somewhere in the dependency tree.default-features = false - std default
- derive default full-test-suite?
-
Enables bilrost-derive
- detailed-errors default full-test-suite?
-
Enables thin-vec
- extended-diagnostics full-test-suite?
-
Enables const_panic
- no-recursion-limit
- third-party-type-support full-test-suite? = arrayvec, bstr, bytestring, chrono, hashbrown, smallvec, thin-vec, time, tinyvec
- arrayvec third-party-type-support?
-
Enables arrayvec
- bstr third-party-type-support?
-
Enables bstr
- bytestring third-party-type-support?
-
Enables bytestring
- chrono third-party-type-support?
-
Enables chrono
"arbitrary" and "std" are both required for proptests
- hashbrown third-party-type-support?
-
Enables hashbrown
- smallvec third-party-type-support?
-
Enables smallvec
- thin-vec third-party-type-support?
-
Enables thin-vec
- time test-suite-extra? third-party-type-support?
-
Enables time
- tinyvec third-party-type-support?
-
Enables tinyvec
- auto-optimize default = auto-self-copy-optimization, auto-unroll-varint-encoding
-
Optimization controls. "auto-optimize" enables the default setting for all optimizations.
- auto-self-copy-optimization auto-optimize
-
Self-copy optimization: This causes copies of short segments of bytes into the prepend buffer to be explicit and happen in reversed order rather than delegating to the intrinsic memcpy. On some architectures (x86_64) this can be a significant improvement; on others (arm64) it's negligible or worse.
The "auto" feature here enables this optimization when on platforms that seem to benefit from it,
the "prefer-no" prevents the "auto" feature from taking effect, and the regular feature enables the feature unconditionally. - prefer-no-self-copy-optimization self-copy-optimization
- auto-unroll-varint-encoding auto-optimize
-
Unroll varint encoding: This changes the spelling of the functions that encode varint values to branch in a way that bisects the resulting length of the varint and then calls an unrollable fixed-length encoding loop once the length is known, rather than implementing a plain loop that may branch on each iteration if the varint is done encoding.
This improves performance significantly in benchmarks on some CPUs but not on others, at the cost of emitted code size. The observed impact of this optimization is still rather conditional regardless: unless the data encoded involves long arrays of encoded varints, the advantages are likely to be far less prevalent.
As in other features, the "auto" feature enables the optimization when it seems like a good idea (currently always), the "prefer-no" feature prevents the "auto" feature from taking effect, and
the regular feature enables the optimization unconditionally. - prefer-no-unroll-varint-encoding unroll-varint-encoding
- full-test-suite = derive, detailed-errors, extended-diagnostics, third-party-type-support
- test-suite-extra = time
-
Extra parameters to outside crates that may affect our encoding and decoding we should test for.
Enables large-dates of time
- pprof
-
Enables pprof profiling in benchmarks.
Enables pprof
pprof prevents building on windows, so must be an optional feature.
pprof's MSRV was bumped to 1.66 in the v0.14 release, so we should continue to support 0.13.