Files
wanderbooks/Cargo.toml
T
swaitsandClaude 724edc61f3 fix(build): the shipped program checks integer overflow, as the tested one does
The release profile left overflow-checks off, so an integer that
overflows wrapped silently in the program that ships and panicked in
the build the tests run: the tests were checking a program nobody runs.
Money itself is Decimal and goes through the kernel's checked
arithmetic; this covers the integers around it (counts, sequence
numbers, minor units, lengths).

Checked: a release build passes -C overflow-checks=on to the workspace's
crates and to their dependencies.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-09 17:32:57 -07:00

44 lines
1.6 KiB
TOML

[workspace]
resolver = "2"
members = ["crates/ledger-core", "crates/ledger-store", "crates/ledger-config", "crates/ledger-mcp", "crates/ledger-import", "crates/ledger-reader", "crates/ledger-cli", "crates/ledger-gui", "crates/ledger-vault", "crates/ledger-host", "crates/ledger-package"]
[workspace.package]
edition = "2024"
license = "MIT OR Apache-2.0"
repository = "https://git.swaits.com/swaits/wanderbooks"
[workspace.lints.rust]
missing_docs = "warn"
# `cargo kani` sets cfg(kani) for the proof harnesses.
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(kani)"] }
# Argon2id at the plan's 64 MiB, three passes, takes seconds unoptimized:
# its crates are built optimized in debug and test builds too.
[profile.dev.package.argon2]
opt-level = 3
[profile.dev.package.blake2]
opt-level = 3
# `wanderbooks update` hashes and verifies a whole program (P11a); its
# tests do it over a debug build's hundreds of megabytes.
[profile.dev.package.sha2]
opt-level = 3
[profile.dev.package.minisign]
opt-level = 3
[profile.dev.package.minisign-verify]
opt-level = 3
# The program that ships in the packages (P11a): symbols stripped, so the
# AppImage, .deb and .rpm are not carrying debug tables.
[profile.release]
strip = "symbols"
# The shipped program refuses the way the tested one does. Without this an
# integer that overflows wraps silently in a release build and panics in
# a test build, so the tests would be checking a program nobody runs.
# Money is Decimal and goes through the kernel's checked arithmetic; this
# covers the integers around it (counts, sequence numbers, minor units).
overflow-checks = true