bitsandbytes 0.1.0

An owned, bit-aware binary codec: fast bit/byte field types and the unified #[bin] macro.
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.85"
name = "bitsandbytes"
version = "0.1.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "An owned, bit-aware binary codec: fast bit/byte field types and the unified #[bin] macro."
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/RawSocketLabs/bitsandbytes"
resolver = "2"

[features]
bytes = [
    "dep:bytes",
    "std",
]
default = ["std"]
std = ["dep:tracing"]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.bnb-macros]
version = "0.1.0"
package = "bitsandbytes-macros"

[dependencies.bytes]
version = "1"
optional = true

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

[dev-dependencies.arbitrary-int]
version = "1.3"

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

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

[dev-dependencies.modular-bitfield-msb]
version = "0.11"

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

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

[lints.clippy]
module_inception = "allow"
print_stderr = "warn"
print_stdout = "warn"
upper_case_acronyms = "allow"

[lints.clippy.all]
level = "deny"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.rust]
missing_docs = "warn"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "deny"