Cargo Features

[dependencies]
chacha20stream = { version = "2.2.1", default-features = false, features = ["async", "explicit_clear", "ad-hoc-buffer", "ffi", "serde", "smallvec"] }
default = ffi, smallvec

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

async = pin-project, tokio

Enable async version with tokio v2.0 AsyncRead/AsyncWrite.

explicit_clear

Explicitly clear in-memory buffers with explicit_bzero() instead of normal bzero().

ad-hoc-buffer

Use a stack (up to a max limit) allocated buffer for Source's raw bytes read from the backing stream instead of a reused backing stream

Affects source::DefaultBuffer

ffi default = libc

Build with C interface bindings

Affects chacha20stream::ffi

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.

libc ffi
pin-project async?
serde implicit feature

Enables serde

serde:

A generic serialization/deserialization framework

smallvec default

Affects stream::BUFFER_SIZE, stream_async::BUFFER_SIZE

tokio async?

Enables tokio ^0.2