This repository was archived by the owner on Aug 22, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
73 lines (67 loc) · 2.86 KB
/
Copy pathCargo.toml
File metadata and controls
73 lines (67 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
[workspace]
members = ["crates/*"]
# A superseded BCF prototype is intentionally kept as a local, ignored
# reference at this path. Excluding it keeps local workspace checks identical
# to a clean clone; the maintained codec lives in 0xkaz/bcf-rust-codec.
exclude = ["crates/ifc-bcf"]
default-members = [
"crates/ifc-parse",
"crates/ifc-geom",
"crates/ifc-bim-json",
"crates/ifc-bim-ids",
"crates/ifc-express-validate",
]
resolver = "3"
[workspace.package]
version = "0.1.0"
authors = ["kaz <kaz@0xkaz.com>"]
edition = "2024"
license = "MIT OR Apache-2.0"
repository = "https://github.com/0xkaz/ifc-engine-core"
rust-version = "1.89"
[workspace.dependencies]
thiserror = "2"
serde = { version = "1", features = ["derive"] }
# Release profile tuned for small WASM artifacts. `opt-level = "z"` and
# `lto = true` are the primary size levers; `codegen-units = 1` adds
# cross-module inlining / dead-code elimination and `strip = true` drops the
# symbol tables. Together the judge-services harvest measured ~20-38% smaller
# `.wasm`.
#
# `panic = "abort"` is intentionally omitted: it makes the `wasm-opt` step in
# `wasm-pack build` fail (exit 1) for both ifc-bim-json and ifc-bim-ids, so the
# wasm builds no longer succeed. (`cargo test` is unaffected either way, since
# the test profile always links with unwinding.) The win from the other three
# levers is already substantial.
#
# NOTE: size-optimized codegen emits modern wasm features (bulk-memory,
# nontrapping-float-to-int, ...) that are the wasm32 target defaults on Rust
# 1.89 but are rejected by the older `wasm-opt` bundled with wasm-pack. Each
# wasm crate therefore passes `-all` to wasm-opt via
# `[package.metadata.wasm-pack.profile.release]` so the optimizer accepts them.
# Tests run optimized. The suites that dominate the gate parse and mesh whole
# synthetic buildings, and an unoptimized parser loop is not a cheaper test — it
# is the same test taking tens of minutes, which is how a gate stops being run.
# `opt-level = 2` (not 3) keeps compile time reasonable; the dependency line
# matters more than the test crates themselves, because the parse and geometry
# inner loops live there.
#
# Semantics are unaffected: no test depends on debug-assertion timing or on
# codegen, and the private measurement gates already run `--release`.
[profile.test]
opt-level = 2
[profile.dev.package."*"]
opt-level = 2
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
strip = true
# Native-only measurement profile for the characterisation harnesses (Layer B
# receipts, staged-input measurement). The WASM-facing `release` profile above
# optimises for artifact size, which also throttles native CPU numbers; native
# measurement wants full speed so CPU reflects the algorithm, not the size
# levers. WASM builds are unaffected: wasm-pack keeps using `release`.
[profile.release-native]
inherits = "release"
opt-level = 3