tinyklv 0.1.0

The simplest Key-Length-Value (KLV) framework in Rust
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.95"
name = "tinyklv"
version = "0.1.0"
authors = ["Arpad Voros <arpadav@gmail.com>"]
build = false
exclude = [
    "TODO.md",
    "book/book/",
]
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "The simplest Key-Length-Value (KLV) framework in Rust"
homepage = "https://arpadvoros.com/tinyklv"
documentation = "https://docs.rs/tinyklv"
readme = "README.md"
keywords = [
    "decode",
    "encode",
    "klv",
    "parsing",
    "tlv",
]
categories = [
    "development-tools",
    "encoding",
    "parsing",
]
license = "MIT"
repository = "https://github.com/arpadav/tinyklv"

[features]
default = []
full = [
    "ascii",
    "chrono",
]
tracing = [
    "dep:tracing",
    "tinyklv-impl/tracing",
]

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

[[example]]
name = "01_hello_world"
path = "examples/01_hello_world.rs"

[[example]]
name = "02_custom_key_types"
path = "examples/02_custom_key_types.rs"

[[example]]
name = "03_strings_and_types"
path = "examples/03_strings_and_types.rs"

[[example]]
name = "04_optional_fields"
path = "examples/04_optional_fields.rs"

[[example]]
name = "05_basic_roundtrip"
path = "examples/05_basic_roundtrip.rs"

[[example]]
name = "06_custom_encoder_decoder"
path = "examples/06_custom_encoder_decoder.rs"

[[example]]
name = "07_sentinel_seeking"
path = "examples/07_sentinel_seeking.rs"

[[example]]
name = "08_nested_packets"
path = "examples/08_nested_packets.rs"

[[example]]
name = "09_ber_keyed"
path = "examples/09_ber_keyed.rs"

[[example]]
name = "10_defaults"
path = "examples/10_defaults.rs"

[[example]]
name = "11_repeated_extraction"
path = "examples/11_repeated_extraction.rs"

[[example]]
name = "12_enum_dispatch_stream"
path = "examples/12_enum_dispatch_stream.rs"

[[example]]
name = "13_variable_length_fields"
path = "examples/13_variable_length_fields.rs"

[[example]]
name = "14_break_condition_custom"
path = "examples/14_break_condition_custom.rs"

[[example]]
name = "15_tokio_stream_e2e"
path = "examples/15_tokio_stream_e2e.rs"

[[example]]
name = "16_latebind"
path = "examples/16_latebind.rs"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.ascii]
version = "1.1.0"
optional = true

[dependencies.chrono]
version = "0.4.44"
optional = true

[dependencies.memchr]
version = "2.8.0"

[dependencies.num-traits]
version = "0.2.19"

[dependencies.paste]
version = "1.0.15"

[dependencies.tinyklv-impl]
version = "0.1.0"

[dependencies.tracing]
version = "0.1.44"
optional = true

[dependencies.winnow]
version = "1.0.2"
features = [
    "parser",
    "simd",
]

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

[dev-dependencies.rand]
version = "^0.10"

[dev-dependencies.rand_distr]
version = "^0.6"

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

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

[profile.dev]
opt-level = 0

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
strip = true