faultbox 0.1.2

Production black-box recorder: structured crash, corruption, and invariant-violation reports with a flight-recorder breadcrumb trail — debuggable from a report without reproduction or shipped symbols.
Documentation
[package]
name = "faultbox"
version = "0.1.2"
edition = "2024"
# 1.88 for let-chains, which this crate uses directly. The `native-crash`
# dependency tree (crash-context, minidump-writer) also requires 1.88.
rust-version = "1.88"
license = "MIT OR Apache-2.0"
description = "Production black-box recorder: structured crash, corruption, and invariant-violation reports with a flight-recorder breadcrumb trail — debuggable from a report without reproduction or shipped symbols."
repository = "https://github.com/farhan-syah/faultbox"
homepage = "https://github.com/farhan-syah/faultbox"
documentation = "https://docs.rs/faultbox"
readme = "README.md"
keywords = ["crash", "diagnostics", "corruption", "reporting", "observability"]
categories = ["development-tools::debugging"]
authors = ["Farhan Syah"]
resolver = "3"
# The multi-process test helper binary, the tests that drive it, and the CI
# scripts are build-time only. Excluding them keeps the published crate a pure
# library.
exclude = ["src/bin", "tests/multiprocess.rs", ".claude", "scripts"]

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

[lib]

[features]
# Out-of-process native-crash (SIGSEGV/abort/stack-overflow) capture as a
# minidump. Pulls in the Embark crash toolchain and requires the host to call
# `faultbox::run_crash_monitor_if_env()` at the very top of `main`. Off by
# default so the base recorder (panics, corruption, invariants) stays lean.
native-crash = ["dep:crash-handler", "dep:minidumper"]

# Feed the flight recorder from `tracing` events, so a project that already
# instruments with `tracing` gets a breadcrumb trail with no manual
# `breadcrumb!` calls. Off by default so the base crate stays dependency-light.
tracing = ["dep:tracing", "dep:tracing-subscriber"]

# A breadcrumb ring in shared memory, keyed to the artifact rather than the
# process. Lets a corruption *detected* by one process carry the writes that
# *caused* it in another — the concurrent-open case a per-process ring can
# never explain.
shared-ring = ["dep:memmap2"]

[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"

# Native-crash capture (optional; enabled by the `native-crash` feature).
# minidumper drives an out-of-process monitor that writes the minidump of the
# crashed process; crash-handler installs the async-signal-safe crash hooks.
crash-handler = { version = "0.8", optional = true }
minidumper = { version = "0.11", optional = true }

# `tracing` bridge (optional; enabled by the `tracing` feature). Only the
# `registry` piece of tracing-subscriber is needed — no formatter, no filter
# engine — so the adopter's own subscriber stack is left entirely alone.
tracing = { version = "0.1", optional = true, default-features = false, features = [
    "std",
] }
tracing-subscriber = { version = "0.3", optional = true, default-features = false, features = [
    "registry",
    "std",
] }

# Shared-memory breadcrumb ring (optional; enabled by the `shared-ring`
# feature).
memmap2 = { version = "0.9", optional = true }

[dev-dependencies]
tempfile = "3"