Files
faunosteo/Cargo.toml
T

57 lines
2.1 KiB
TOML

# Faunosteo Rust workspace (plan R0, docs/development/RUST_ARCHITECTURE_REVIEW.md Part III).
# Three crates: core (feature-gated library), wasm (browser facade), worker (service binary).
# Every command runs through the builder image: docs/development/RUST.md.
[workspace]
resolver = "3"
members = ["crates/core", "crates/wasm", "crates/worker"]
[workspace.package]
version = "0.1.0"
edition = "2024"
license = "MIT"
rust-version = "1.99"
publish = false
# The path dependency on crates/core is declared per crate (`path = "../core"`): cargo-deny
# 0.20 reads a workspace-inherited path dependency as a wildcard and fails the bans check.
[workspace.dependencies]
serde = { version = "1.0.229", features = ["derive"] }
# preserve_order keeps the input key order of parsed documents (JSON.stringify semantics).
# float_roundtrip: the default parser is a fast path that can be one ULP off (found by the R0
# proof: 1715.4285714285713 came back as 1715.428571428571); JavaScript parses correctly.
serde_json = { version = "1.0.154", features = ["preserve_order", "float_roundtrip"] }
ts-rs = { version = "12.0", features = ["serde-compat"] }
# The CLI in docker/rust-builder.Dockerfile must be this exact version.
wasm-bindgen = "=0.2.129"
image = { version = "0.25.10", default-features = false, features = ["jpeg", "png", "webp"] }
libwebp-sys = "0.14.4"
seccompiler = "0.5.0"
rlimit = "0.11"
libc = "0.2"
# The library crates deny unwrap/expect so that no panic path depends on content;
# the worker binary relaxes disallowed_methods (it owns I/O) in its own [lints].
[workspace.lints.rust]
unsafe_code = "forbid"
[workspace.lints.clippy]
unwrap_used = "deny"
expect_used = "deny"
disallowed_methods = "deny"
# Dependencies optimised even in debug builds: the sandbox tests decode 4096² images under a
# 10 s CPU limit, which an unoptimised image decoder does not meet.
[profile.dev.package."*"]
opt-level = 3
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
# The worker child dies on a panic (the parent logs it); on wasm32 the std is abort anyway.
panic = "abort"
strip = "symbols"
[profile.release.package.faunosteo-wasm]
opt-level = "z"