typedflake 0.2.0

Snowflake-style IDs as distinct, validated newtypes
Documentation
# 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"
rust-version = "1.99"
name = "typedflake"
version = "0.2.0"
authors = ["pokedotdev <hi@poke.dev>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Snowflake-style IDs as distinct, validated newtypes"
homepage = "https://github.com/pokedotdev/typedflake"
documentation = "https://docs.rs/typedflake"
readme = "README.md"
keywords = [
    "snowflake",
    "id-generator",
    "distributed",
    "unique-id",
    "newtype",
]
categories = [
    "data-structures",
    "algorithms",
    "concurrency",
]
license = "MIT"
repository = "https://github.com/pokedotdev/typedflake"

[package.metadata.docs.rs]
all-features = true

[features]
default = []
postgres = [
    "dep:postgres-types",
    "typedflake-macros/postgres",
]
serde = [
    "dep:serde",
    "typedflake-macros/serde",
]
sqlx-postgres = [
    "dep:sqlx",
    "typedflake-macros/sqlx-postgres",
]
tokio = [
    "dep:tokio",
    "typedflake-macros/tokio",
]

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

[[example]]
name = "demo"
path = "examples/demo.rs"

[[example]]
name = "serde"
path = "examples/serde.rs"
required-features = ["serde"]

[[example]]
name = "typed_node"
path = "examples/typed_node.rs"

[[example]]
name = "waiting"
path = "examples/waiting.rs"
required-features = ["tokio"]

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

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

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

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

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

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

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

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

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

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

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

[[bench]]
name = "performance"
path = "benches/performance.rs"
harness = false

[dependencies.postgres-types]
version = "0.2"
optional = true

[dependencies.serde]
version = "1.0"
features = ["std"]
optional = true
default-features = false

[dependencies.sqlx]
version = "0.8"
features = ["postgres"]
optional = true
default-features = false

[dependencies.tokio]
version = "1"
features = ["time"]
optional = true
default-features = false

[dependencies.typedflake-macros]
version = "=0.2.0"

[dev-dependencies.bincode]
version = "1.3"

[dev-dependencies.criterion]
version = "0.7"
features = ["html_reports"]

[dev-dependencies.proptest]
version = "1"

[dev-dependencies.serde]
version = "1.0"
features = [
    "std",
    "derive",
]
default-features = false

[dev-dependencies.serde_json]
version = "1.0"

[dev-dependencies.sqlx]
version = "0.8"
features = [
    "postgres",
    "runtime-tokio",
    "derive",
]
default-features = false

[dev-dependencies.tokio]
version = "1"
features = [
    "macros",
    "rt-multi-thread",
    "time",
    "test-util",
]
default-features = false

[dev-dependencies.tokio-postgres]
version = "0.7"

[dev-dependencies.trybuild]
version = "1"