Files
Senbei/Cargo.toml
T
Momoko-Ayase 4853fe22c0 feat: localize console output and add a run observer
Engine errors, integrity findings, and driver outcomes carry message
codes from senbei-i18n, with their English unchanged, so reports, logs,
and --json stay byte-identical. Verbose pipeline steps go through a
progress sink instead of println!, and an error chain is translated
through its first coded cause.

The CLI takes the display language from SENBEI_LANG, or else from the
system's preferred UI language, and translates console text: usage
errors, help, per-file lines, the run summary, and the summary lines of
the inspect report. Structural research evidence and saved logs stay
English. When a translation leaves out context the English chain has,
the English follows on a muted line.

A front end can attach a RunObserver and a CancelToken to the Collector
to follow a run input by input, receive verbose steps as events, and
stop before the next input. A cancelled report says so. The CLI never
cancels, so its JSON is unchanged.
2026-11-08 02:41:04 +08:00

68 lines
1.6 KiB
TOML

[workspace]
members = [
"senbei-cli",
"senbei-crypto",
"senbei-elf",
"senbei-engine",
"senbei-i18n",
"senbei-io",
"senbei-metadata",
"senbei-pe",
]
default-members = ["senbei-cli"]
# The wasm bindings crate is its own crate (own Cargo.lock, cdylib) and stays
# outside the workspace. `fuzz` is a cargo-fuzz crate with its own nightly
# requirements and must not join workspace builds.
exclude = ["senbei-wasm", "fuzz"]
resolver = "2"
[workspace.package]
version = "1.3.4"
edition = "2024"
rust-version = "1.99.1"
license = "AGPL-3.0-only"
[workspace.dependencies]
aes = "0.9"
anyhow = "1"
goblin = "0.10"
indicatif = "0.18"
libc = "0.2"
memmap2 = "0.9"
owo-colors = "4"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.11"
tempfile = "3"
thiserror = "2"
walkdir = "2"
windows = { version = "0.62", features = [
"Win32_Foundation",
"Win32_Globalization",
"Win32_System_Console",
"Win32_System_SystemInformation",
] }
zip = { version = "9.3", default-features = false, features = ["deflate"] }
senbei-crypto = { path = "senbei-crypto" }
senbei-elf = { path = "senbei-elf" }
senbei-engine = { path = "senbei-engine" }
senbei-i18n = { path = "senbei-i18n" }
senbei-io = { path = "senbei-io" }
senbei-metadata = { path = "senbei-metadata" }
senbei-pe = { path = "senbei-pe" }
[workspace.lints.rust]
unsafe_op_in_unsafe_fn = "deny"
[workspace.lints.clippy]
correctness = { level = "deny", priority = -1 }
suspicious = { level = "warn", priority = -1 }
complexity = { level = "warn", priority = -1 }
perf = { level = "warn", priority = -1 }
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true