# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] edition = "2018" name = "leaves" version = "0.5.0" authors = ["lsongzhi "] description = "Distributed ID Allocator" readme = "README.md" keywords = ["distribution", "id", "async", "await"] license = "MIT" repository = "https://github.com/songzhi/leaves" [package.metadata.docs.rs] features = ["mysql", "postgres", "sqlite", "redis", "mongo"] rustdoc-args = ["--cfg", "docsrs"] [lib] path = "src/lib.rs" [[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 [dependencies.async-mutex] version = "1.1" [dependencies.async-std] version = "1.6" optional = true [dependencies.async-trait] version = "0.1" [dependencies.bson] version = "1.1.0" optional = true [dependencies.cfg-if] version = "0.1" [dependencies.darkredis] version = "0.7" optional = true default-features = false [dependencies.dashmap] version = "4.0.0-rc6" [dependencies.event-listener] version = "2.3" [dependencies.futures-util] version = "0.3.5" [dependencies.mongodb] version = "1.1.0" optional = true default-features = false [dependencies.num_cpus] version = "1.13" [dependencies.serde] version = "1.0" features = ["derive"] [dependencies.sqlx] version = "0.3" features = ["macros"] optional = true default-features = false [dependencies.thiserror] version = "1.0" [dependencies.tokio] version = "0.2" features = ["time", "rt-threaded"] optional = true [dependencies.tracing] version = "0.1" [dev-dependencies.criterion] version = "0.3" [dev-dependencies.dotenv] version = "0.15" [dev-dependencies.fastrand] version = "1.3" [features] default = ["runtime-tokio"] mongo = ["mongodb", "bson"] mysql = ["sqlx", "sqlx/mysql"] postgres = ["sqlx", "sqlx/postgres"] redis = ["darkredis"] runtime-async-std = ["async-std", "sqlx/runtime-async-std", "darkredis/runtime_async_std", "mongodb/async-std-runtime"] runtime-tokio = ["tokio", "sqlx/runtime-tokio", "darkredis/runtime_tokio", "mongodb/tokio-runtime"] sqlite = ["sqlx", "sqlx/sqlite"]