bare-types 0.1.7

A zero-cost foundation for type-safe domain modeling in Rust. Implements the 'Parse, don't validate' philosophy to eliminate primitive obsession and ensure data integrity at the system boundary.
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.94.0"
name = "bare-types"
version = "0.1.7"
authors = ["bare-rs contributors"]
build = false
include = [
    "src/**/*",
    "LICENSE-*",
    "README.md",
    "CHANGELOG.md",
    "NOTICE.md",
    "examples/**/*",
    "benches/**/*",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A zero-cost foundation for type-safe domain modeling in Rust. Implements the 'Parse, don't validate' philosophy to eliminate primitive obsession and ensure data integrity at the system boundary."
homepage = "https://github.com/bare-rs/bare-types"
documentation = "https://docs.rs/bare-types"
readme = "README.md"
keywords = [
    "types",
    "newtype",
    "validation",
    "domain",
    "modeling",
]
categories = [
    "data-structures",
    "development-tools",
    "no-std",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/bare-rs/bare-types"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]
targets = [
    "x86_64-unknown-linux-gnu",
    "x86_64-apple-darwin",
    "x86_64-pc-windows-msvc",
]

[package.metadata.bare]
design_rules = "CONTRIBUTING.md"
architecture = "ARCHITECTURE.md"
governance = "GOVERNANCE.md"
ai_friendly = true
strict_linting = true

[badges.maintenance]
status = "actively-developed"

[features]
arbitrary = ["dep:arbitrary"]
default = []
net = ["dep:heapless"]
serde = [
    "dep:serde",
    "heapless/serde",
]
std = []
sys = [
    "dep:heapless",
    "net",
]
zeroize = ["dep:zeroize"]

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

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

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

[[example]]
name = "integration_demo"
path = "examples/integration_demo.rs"
required-features = [
    "net",
    "sys",
]

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

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

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

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

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

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

[[bench]]
name = "benchmarks"
path = "benches/benchmarks.rs"
harness = false
required-features = [
    "net",
    "sys",
]

[dependencies.arbitrary]
version = "1.4.2"
features = ["derive"]
optional = true

[dependencies.heapless]
version = "0.9.2"
optional = true
default-features = false

[dependencies.serde]
version = "1.0.228"
features = ["derive"]
optional = true
default-features = false

[dependencies.zeroize]
version = "1.8.2"
features = ["derive"]
optional = true

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

[lints.clippy]
as_conversions = "allow"
implicit_return = "allow"
indexing_slicing = "allow"
integer_division_remainder_used = "allow"
map_err_ignore = "allow"
min_ident_chars = "allow"
question_mark_used = "allow"
same_name_method = "allow"
single_call_fn = "allow"

[lints.rust]
absolute-paths-not-starting-with-crate = "warn"
ambiguous-associated-items = "deny"
ambiguous-negative-literals = "warn"
arithmetic-overflow = "deny"
async-fn-in-trait = "warn"
bad-asm-style = "warn"
binary-asm-labels = "deny"
bindings-with-variant-name = "deny"
closure-returning-async-block = "warn"
conflicting-repr-hints = "deny"
dangerous-implicit-autorefs = "deny"
dead-code = "warn"
dependency-on-unit-never-type-fallback = "deny"
deprecated = "deny"
deprecated-in-future = "warn"
deprecated-safe-2024 = "warn"
deref-into-dyn-supertrait = "warn"
deref-nullptr = "deny"
edition-2024-expr-fragment-specifier = "warn"
elided-lifetimes-in-associated-constant = "deny"
elided-lifetimes-in-paths = "warn"
enum-intrinsics-non-enums = "deny"
explicit-outlives-requirements = "warn"
if-let-rescope = "warn"
ill-formed-attribute-input = "deny"
impl-trait-overcaptures = "warn"
impl-trait-redundant-captures = "warn"
improper-ctypes = "warn"
improper-ctypes-definitions = "warn"
invalid-atomic-ordering = "deny"
invalid-from-utf8 = "warn"
invalid-from-utf8-unchecked = "deny"
invalid-nan-comparisons = "warn"
invalid-value = "warn"
keyword-idents-2018 = "warn"
keyword-idents-2024 = "warn"
late-bound-lifetime-arguments = "deny"
legacy-derive-helpers = "deny"
let-underscore-drop = "warn"
linker-messages = "warn"
macro-use-extern-crate = "warn"
malformed-diagnostic-attributes = "warn"
malformed-diagnostic-format-literals = "warn"
missing-abi = "warn"
missing-copy-implementations = "warn"
missing-debug-implementations = "warn"
missing-unsafe-on-extern = "warn"
missing_docs = "warn"
mixed-script-confusables = "warn"
named-arguments-used-positionally = "warn"
non-ascii-idents = "warn"
non-camel-case-types = "warn"
non-contiguous-range-endpoints = "warn"
non-fmt-panics = "warn"
non-local-definitions = "warn"
non-shorthand-field-patterns = "warn"
non-snake-case = "warn"
non-upper-case-globals = "warn"
noop-method-call = "warn"
overlapping-range-endpoints = "warn"
path-statements = "warn"
redundant-imports = "warn"
redundant-lifetimes = "warn"
redundant-semicolons = "warn"
rust-2021-incompatible-closure-captures = "warn"
rust-2021-incompatible-or-patterns = "warn"
rust-2021-prefixes-incompatible-syntax = "warn"
rust-2021-prelude-collisions = "warn"
rust-2024-guarded-string-incompatible-syntax = "warn"
rust-2024-incompatible-pat = "warn"
rust-2024-prelude-collisions = "warn"
single-use-lifetimes = "warn"
unnameable-types = "warn"
unreachable-pub = "warn"
unsafe-attr-outside-unsafe = "warn"
unsafe-op-in-unsafe-fn = "warn"
unsafe_code = "forbid"
unstable-features = "warn"
unused-crate-dependencies = "warn"
unused-extern-crates = "warn"
unused-import-braces = "warn"
unused-lifetimes = "warn"
unused-macro-rules = "warn"
unused-qualifications = "warn"
unused-results = "warn"
variant-size-differences = "warn"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(docsrs)"]