[package] name = "leaves" version = "0.5.0" authors = ["lsongzhi "] edition = "2018" repository = "https://github.com/songzhi/leaves" readme = "README.md" keywords = ["distribution", "id", "async", "await"] license = "MIT" description = "Distributed ID Allocator" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] path = "src/lib.rs" [features] default = ["runtime-tokio"] mysql = ["sqlx", "sqlx/mysql"] postgres = ["sqlx", "sqlx/postgres"] sqlite = ["sqlx", "sqlx/sqlite"] redis = ["darkredis"] mongo = ["mongodb", "bson"] runtime-tokio = ["tokio", "sqlx/runtime-tokio", "darkredis/runtime_tokio", "mongodb/tokio-runtime"] runtime-async-std = ["async-std", "sqlx/runtime-async-std", "darkredis/runtime_async_std", "mongodb/async-std-runtime"] [dependencies] async-trait = "0.1" dashmap = "4.0.0-rc6" num_cpus = "1.13" cfg-if = "0.1" thiserror = "1.0" tracing = "0.1" serde = { version="1.0", features=["derive"] } async-mutex = "1.1" futures-util = "0.3.5" tokio = { version="0.2", features=["time", "rt-threaded"], optional=true } async-std = { version = "1.6", optional=true } darkredis = { version="0.7", default-features = false, optional=true } sqlx = { version="0.3", default-features = false, features=["macros"] , optional=true } mongodb = { version="1.1.0", default-features = false, optional=true } bson = { version="1.1.0", optional=true } event-listener = "2.3" [dev-dependencies] dotenv = "0.15" criterion = "0.3" fastrand = "1.3" [package.metadata.docs.rs] features = ["mysql", "postgres", "sqlite", "redis", "mongo"] rustdoc-args = ["--cfg", "docsrs"] [[example]] name = "redis" path = "examples/redis.rs" required-features = ["redis", "tokio/macros"] [[example]] name = "mysql" path = "examples/mysql.rs" required-features = ["mysql", "tokio/macros"] [[test]] name = "mongodb" path = "tests/mongodb.rs" required-features = ["mongo", "tokio/macros"] [[test]] name = "redis" path = "tests/redis.rs" required-features = ["redis", "tokio/macros"] [[bench]] name = "segment" harness = false