# 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 are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "sfid"
version = "0.1.4"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Distributed Snowflake ID generator with Redis-based auto machine ID allocation / 基于 Redis 自动分配机器号的分布式雪花 ID 生成器"
homepage = "https://github.com/js0-site/rust/tree/main/sfid"
readme = "README.md"
keywords = [
    "snowflake",
    "id-generator",
    "distributed",
    "redis",
    "unique-id",
]
license = "MulanPSL-2.0"
repository = "https://github.com/js0-site/rust.git"
resolver = "2"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
auto_pid = [
    "snowflake",
    "dep:fred",
    "dep:xkv",
    "dep:uuid",
    "dep:tokio",
    "dep:xbin",
    "dep:rand",
    "dep:log",
]
default = [
    "snowflake",
    "auto_pid",
]
parse = []
snowflake = ["dep:coarsetime"]

[lib]
name = "sfid"
path = "src/lib.rs"

[[test]]
name = "main"
path = "tests/main.rs"

[dependencies.coarsetime]
version = "0.1.36"
optional = true

[dependencies.fred]
version = "10.1.0"
optional = true

[dependencies.fs4]
version = "0.13.1"
features = ["tokio"]

[dependencies.log]
version = "0.4"
optional = true

[dependencies.machine-uid]
version = "0.5.4"

[dependencies.rand]
version = "0.9"
optional = true

[dependencies.thiserror]
version = "2.0.17"

[dependencies.tokio]
version = "1.48.0"
features = [
    "rt",
    "time",
]
optional = true

[dependencies.tracing]
version = "0.1.44"

[dependencies.uuid]
version = "1"
features = ["v4"]
optional = true

[dependencies.xbin]
version = "0.1.9"
optional = true

[dependencies.xkv]
version = "0.1"
features = ["r"]
optional = true

[dev-dependencies.aok]
version = "0.1.18"

[dev-dependencies.log_init]
version = "0.1.34"

[dev-dependencies.static_init]
version = "1.0.4"
features = ["parking_lot"]

[dev-dependencies.tokio]
version = "1.48.0"
features = [
    "macros",
    "rt",
    "rt-multi-thread",
    "time",
    "sync",
]

[dev-dependencies.xboot]
version = "0.1.35"
