bstack 0.2.2

A persistent, fsync-durable binary stack backed by a single file
Documentation
[package]
name = "bstack"
version = "0.2.2"
edition = "2024"
authors = ["William Wu <williamwutq@gmail.com>", "Claude <claude@anthropic.com>"]
license = "MIT"
description = "A persistent, fsync-durable binary stack backed by a single file"
readme = "README.md"
changelog = "CHANGELOG.md"
repository = "https://github.com/williamwutq/bstack"
documentation = "https://docs.rs/bstack"
keywords = ["stack", "persistent", "file-backed", "database", "binary"]
include = ["src/**/*", "Cargo.toml", "README.md", "CHANGELOG.md", "LICENSE", "examples/**/*.rs", ".gitignore"]

[features]
# Enables BStack::set — in-place mutation of existing payload bytes.
set = []
# Enables BStackAllocator trait and BStackSlice for region management.
alloc = []
# Enables atomic compound operations: atrunc, splice, splice_into, try_extend, try_discard,
# and (with set) swap, swap_into, cas.
atomic = []
# Enables BStackGuardedSlice and related hook-based slice abstractions.
guarded = ["alloc"]

[target.'cfg(unix)'.dependencies]
libc = "0.2"

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.52", features = [
    "Win32_Foundation",
    "Win32_Storage_FileSystem",
    "Win32_System_IO",
] }

[[example]]
name = "bstack_bytevec"
required-features = ["alloc", "set"]

[[example]]
name = "alloc_basic"
required-features = ["alloc", "set"]

[[example]]
name = "alloc_typed"
required-features = ["alloc", "set"]

[[example]]
name = "custom_alloc"
required-features = ["alloc", "set"]

[[example]]
name = "hashmap"
required-features = ["set"]

[[example]]
name = "atomic_ops"
required-features = ["atomic"]

[[example]]
name = "atomic_race"
required-features = ["atomic"]

[dev-dependencies]
rand = "0.10.1"
criterion = { version = "0.5", features = ["html_reports"] }

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

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