Cargo.toml
[workspace]
members = [
"crates/be-block",
"crates/be-client",
"crates/be-commit",
"crates/be-compositor",
"crates/be-graph",
"crates/be-model",
"crates/be-model-derive",
"crates/be-protocol",
"crates/be-server",
"crates/be-session",
"crates/be-store",
"crates/beui",
"crates/beui_macros",
"crates/reactive_macros",
"crates/reactive",
"crates/block-ui",
"crates/block-ui-test",
"crates/test-third-party",
"crates/text-editor-core",
"crates/block-app",
"crates/tabletop_games/api",
"crates/tabletop_games/host",
"crates/tabletop_games/rules/connect_four",
"crates/tabletop_games/rules/crazy_8s",
"crates/tabletop_games/rules/tic_tac_toe",
"crates/logicgame",
"crates/cvl2",
"crates/editors/audio_block",
"crates/editors/browser_tab",
"crates/editors/calendar",
"crates/editors/checklist",
"crates/editors/compiled_logic",
"crates/editors/counter",
"crates/editors/database",
"crates/editors/database_schema",
"crates/editors/database_view",
"crates/editors/deterministic_game",
"crates/editors/file_tree",
"crates/editors/game_module",
"crates/editors/hotbar",
"crates/editors/image_block",
"crates/editors/infinite_canvas",
"crates/editors/logic_game",
"crates/editors/logic_grid",
"crates/editors/map",
"crates/editors/paint_review",
"crates/editors/pan_zoom",
"crates/editors/pdf",
"crates/editors/pixel_art",
"crates/editors/pixel_ray_tracer",
"crates/editors/presentation",
"crates/editors/scene_3d",
"crates/editors/settings",
"crates/editors/text_block",
"crates/editors/ui_settings",
"crates/editors/video_block",
"crates/editors/workspace_index",
"crates/editors/workspace_ui",
"crates/block-editor-plugin",
"crates/block-gpu-abi",
"crates/block-gpu-guest",
"crates/block-gpu-host",
"crates/block-gpu-shim",
"crates/block-wasm-host",
"crates/block-plugin-api",
"crates/ghostty-vt",
"crates/paint-snapshot",
"crates/plugin-test-runner",
"crates/fix-rust-source",
"crates/buck-tools",
"crates/wasi-threads",
]
resolver = "3"
[workspace.package]
edition = "2024"
version = "0.1.0"
license = "MIT"
[workspace.lints.clippy]
too_many_arguments = "allow"
[profile.dev]
debug = "line-tables-only"
incremental = false
# Line tables are worth having for the code in this repository, because a
# backtrace through it is a backtrace someone is about to act on. For the six
# hundred crates underneath it they are debug info nobody reads, emitted by
# rustc and then carried through every link. "*" is dependencies only, so the
# workspace keeps what the profile above gives it.
[profile.dev.package."*"]
debug = false
[profile.test]
debug = "line-tables-only"
incremental = false
[profile.test.package."*"]
debug = false
[profile.release-check]
inherits = "dev"
debug-assertions = false
overflow-checks = false
debug = false
incremental = false
[profile.plugin]
inherits = "dev"
opt-level = 2
debug = false
strip = "debuginfo"
incremental = false
[profile.plugin-release]
inherits = "release"
strip = "debuginfo"
# The new block stack seals every chunk it stores with ChaCha20-Poly1305 and
# names it by its SHA-256, and unoptimised those are most of what saving or
# opening a file costs: eight megabytes took three and a half seconds to save
# and two and a half to open in a debug build. Optimising the cipher, the hash
# and be-store, which instantiates both, brings that to a third of a second.
# The websocket they travel over masks every byte a client sends, which is the
# same kind of loop.
[profile.dev.package.aead]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.be-store]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.block-buffer]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.chacha20]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.chacha20poly1305]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.cipher]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.digest]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.poly1305]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.sha2]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.tungstenite]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.tokio-tungstenite]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.universal-hash]
opt-level = 2
debug-assertions = false
overflow-checks = false
# Cranelift is what compiles a plugin, both in the app when an artifact is
# missing and in the compiler the build hands every plugin to, and unoptimised
# it is an order of magnitude slower at it: the plugins a debug build ships take
# minutes rather than seconds. Optimising the compiler where it is built is what
# lets it be built in the same profile, and so the same cargo call, as the app.
#
# The checks a debug build adds cost it a fifth of its speed on top of that,
# and they are checks on someone else's code rather than on ours, so they come
# off with the optimisation going on. Compiling the plugin test modules is a
# minute of every verify, and the app pays the same price whenever it opens a
# plugin it has no artifact for.
#
# opt-level 1 was measured against this and is a worse trade, not a cheaper one:
# cranelift-codegen compiles 44 seconds faster, and compiling six plugin modules
# with the result goes from 22 seconds to 34. A verify compiles closer to seventy
# of them, so what the build saves the plugins pay back three times over.
[profile.dev.package.cranelift-assembler-x64]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.cranelift-bforest]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.cranelift-bitset]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.cranelift-codegen]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.cranelift-control]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.cranelift-entity]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.cranelift-frontend]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.cranelift-native]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.regalloc2]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.wasmparser]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.wasmtime]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.wasmtime-environ]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.wasmtime-internal-core]
opt-level = 2
debug-assertions = false
overflow-checks = false
[profile.dev.package.wasmtime-internal-cranelift]
opt-level = 2
debug-assertions = false
overflow-checks = false