Cargo Features

[dependencies]
zbox = { version = "0.9.2", default-features = false, features = ["test-perf", "storage-mem", "storage-file", "storage-faulty", "storage-sqlite", "storage-redis", "storage-zbox-faulty", "storage-zbox-native", "storage-zbox-android", "storage-zbox", "libsodium-bundled", "docs-rs"] }
default = storage-mem

The storage-mem feature is set by default whenever zbox is added without default-features = false somewhere in the dependency tree.

test-perf = storage-file

performance test compilation flag

storage-mem default

memory storage

storage-file storage-faulty? test-perf?

file storage

Affects utils::ensure_parents_dir, utils::remove_empty_parent_dir

storage-faulty = storage-file

faulty storage for random io error test

storage-sqlite = libsqlite3-sys

sqlite storage

storage-redis = redis

redis storage

storage-zbox-faulty = storage-zbox

zbox storage with faulty transport, for test only

storage-zbox-native = reqwest, storage-zbox

zbox storage with native transport

storage-zbox-android = storage-zbox

zbox storage with android storage as local cache backend

storage-zbox storage-zbox-android? storage-zbox-faulty? storage-zbox-native? = http, serde_json

zbox storage base dependencies

Affects utils::ensure_parents_dir, utils::remove_empty_parent_dir

libsodium-bundled

build-in libsodium dependency

docs-rs

feature for documentation build on docs.rs

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

libsqlite3-sys storage-sqlite?

Enables libsqlite3-sys ^0.22.2

redis storage-redis?

Enables redis ^0.21.2

http storage-zbox?

Enables http ^0.2.4

serde_json storage-zbox?
reqwest storage-zbox-native?

Enables reqwest ^0.9.18