[package]
name = "facet-core"
version = "0.32.2"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
description = "Core types and traits for the facet ecosystem"
keywords = ["reflection", "core"]
categories = ["development-tools"]

[package.metadata.docs.rs]
rustdoc-args = ["--html-in-header", "arborium-header.html"]

[features]
ci = [] # CI feature
auto-traits = []
default = ["std"]
# Enable standard library support
std = ["alloc"]
# Enable allocation support (required for facet-core to function)
alloc = []
# Provide Facet trait implementations for NonZero<T> types
nonzero = []
# Provide Facet trait implementations for network types (SocketAddr, IpAddr, etc.)
net = []
# Provide Facet trait implementations for camino::Utf8Path and camino::Utf8PathBuf
camino = ["dep:camino", "alloc"]
# Provide Facet trait implementations for ordered_float types
ordered-float = ["dep:ordered-float"]
# Provide Facet trait implementations for uuid::Uuid
uuid = ["alloc", "dep:uuid"]
# Provide Facet trait implementations for ulid::Ulid
ulid = ["alloc", "dep:ulid"]
# Provide Facet trait implementations for time crate types
time = ["alloc", "dep:time"]
# Provide Facet trait implementations for chrono crate types
chrono = ["alloc", "dep:chrono"]
# Provide Facet trait implementations for url::Url
url = ["alloc", "dep:url"]
# Provide Facet trait implementations for jiff crate types
jiff02 = ["alloc", "dep:jiff"]
# Provide Facet trait implementations for bytes::Bytes
bytes = ["alloc", "dep:bytes"]
# Provide Facet trait implementations for num_complex::Complex
num-complex = ["dep:num-complex"]
# Provide Facet trait implementations for ruint::Uint and ruint::Bits
ruint = ["alloc", "dep:ruint", "ruint?/alloc"]
# Provide Facet trait implementations for indexmap::IndexMap and indexmap::IndexSet
indexmap = ["alloc", "dep:indexmap"]

# Provide Facet trait implementations for tuples up to size 12. Without it,
# Facet is only implemented for tuples up to size 4.
tuples-12 = []

# Provide Facet trait implementations for function pointers.
fn-ptr = []

# Provide Facet trait implementations for portable SIMD types (requires nightly).
# This adds 84 type implementations which increases compile time.
simd = []

[build-dependencies]
autocfg = "1.3"

[dependencies]
url = { version = "2.5.4", optional = true, default-features = false }
bitflags = "2.9.1"
camino = { version = "1", optional = true }
ordered-float = { version = "5.0.0", optional = true, default-features = false }
uuid = { version = "1.17.0", optional = true }
ulid = { version = "1.2.1", optional = true }
time = { version = "0.3.41", optional = true, features = [
    "parsing",
    "formatting",
] }
chrono = { version = "0.4", optional = true, default-features = false, features = [
    "alloc",
    "clock",
] }
jiff = { version = "0.2.15", optional = true }
bytes = { version = "1.10.1", optional = true, default-features = false }
num-complex = { version = "0.4.6", optional = true, default-features = false }
ruint = { version = "1.17.0", optional = true, default-features = false }
indexmap = { version = "2", optional = true, default-features = false }
impls = { version = "1" }


[dev-dependencies]
facet-testhelpers = { path = "../facet-testhelpers" }
