[workspace]
members = ["crates/*"]
resolver = "3"

[workspace.package]
version = "0.2.0"
authors = ["nekitdev <nekit@nekit.dev>"]
rust-version = "1.96"
edition = "2024"
repository = "https://github.com/nekitdev/refining"
license = "MIT"

[package]
name = "refining"
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
description = "Refinement types."
documentation = "https://docs.rs/refining"
readme = "README.md"
repository.workspace = true
license.workspace = true
keywords = ["refinement", "type"]
categories = ["no-std", "no-std::no-alloc", "rust-patterns"]

[workspace.dependencies.anyhow]
version = "1.0.102"
default-features = false

[workspace.dependencies.tiny-input]
version = "0.2.0"
default-features = false

[workspace.dependencies.regex]
version = "1.12.4"
default-features = false

[workspace.dependencies.serde]
version = "1.0.228"
default-features = false

[workspace.dependencies.thiserror]
version = "2.0.18"
default-features = false

[workspace.dependencies.refining-core]
path = "crates/refining-core"
version = "0.2.0"
default-features = false

[workspace.dependencies.refining-empty]
path = "crates/refining-empty"
version = "0.2.0"
default-features = false

[workspace.dependencies.refining-length]
path = "crates/refining-length"
version = "0.2.0"
default-features = false

[workspace.dependencies.refining-int]
path = "crates/refining-int"
version = "0.2.0"
default-features = false

[workspace.dependencies.refining-char]
path = "crates/refining-char"
version = "0.2.0"
default-features = false

[workspace.dependencies.refining-str]
path = "crates/refining-str"
version = "0.2.0"
default-features = false

[workspace.dependencies.refining-regex]
path = "crates/refining-regex"
version = "0.2.0"
default-features = false

[dependencies.refining-core]
workspace = true

[dependencies.refining-empty]
workspace = true
optional = true

[dependencies.refining-length]
workspace = true
optional = true

[dependencies.refining-int]
workspace = true
optional = true

[dependencies.refining-char]
workspace = true
optional = true

[dependencies.refining-str]
workspace = true
optional = true

[dependencies.refining-regex]
workspace = true
optional = true

[dev-dependencies.anyhow]
workspace = true

[dev-dependencies.tiny-input]
workspace = true

[features]
default = ["std", "empty", "length", "int", "char", "str", "regex", "serde"]
empty = ["refining-empty"]
length = ["refining-length"]
int = ["refining-int"]
char = ["refining-char"]
str = ["refining-str"]
regex = ["refining-regex", "std"]
unsafe-assert = ["refining-core/unsafe-assert"]
serde = ["refining-core/serde"]
alloc = ["refining-empty?/alloc", "refining-length?/alloc"]
std = ["refining-empty?/std", "refining-length?/std"]

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