structio 0.8.0

High performance JSON and BEVE for Rust structs. No dependencies, no proc-macros, no intermediate representation.
Documentation
[package]
name = "structio"
version = "0.8.0"
edition = "2024"
rust-version = "1.96"
license = "MIT OR Apache-2.0"
description = "High performance JSON and BEVE for Rust structs. No dependencies, no proc-macros, no intermediate representation."
repository = "https://github.com/matrix-research-inc/structio"
keywords = ["json", "beve", "serialization", "binary", "performance"]
categories = ["encoding", "parser-implementations"]

# Kept out of the published tarball. `rust-toolchain.toml` pins the toolchain
# for work in this repository and has no meaning in a dependency, where nothing
# reads it; the CI configuration is about the repository rather than the crate.
# Everything else ships, tests and docs included, so the package is the source.
exclude = [".github/", "rust-toolchain.toml", "structio-derive/"]

[workspace]
members = ["structio-derive"]

[features]
# `#[derive(Structio)]`, a front end to the declaration macros. Off by
# default: the crate's dependency-free build is unchanged, and the macros
# remain the way to declare a type you do not own.
derive = ["dep:structio-derive"]

[dependencies]
# Pinned exactly: the derive emits the macros' syntax, so the two crates move
# together and are published together, the derive first.
structio-derive = { version = "=0.8.0", path = "structio-derive", optional = true }

[package.metadata.docs.rs]
all-features = true

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

[profile.bench]
opt-level = 3
lto = "fat"
codegen-units = 1

[[bench]]
name = "roundtrip"
harness = false

[[test]]
name = "derive"
required-features = ["derive"]

[dev-dependencies]
# The compile-fail harness for tests/ui, for the same reason `structio-derive`
# carries it: `nocompile` depends on nothing but `std`. What it pins here is
# the messages the declaration macros produce when a declaration is refused,
# which no ordinary test can reach -- the fixtures are programs that must not
# compile.
nocompile = "0.8"

[[example]]
name = "derive"
required-features = ["derive"]