-
-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathCargo.toml
More file actions
76 lines (66 loc) · 2.9 KB
/
Copy pathCargo.toml
File metadata and controls
76 lines (66 loc) · 2.9 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
74
75
76
[workspace]
exclude = ["rust/python"]
members = ["rust/core", "rust/geometry", "rust/processing", "rust/clash", "rust/ffi", "rust/export", "rust/wasm-bindings", "apps/server"]
resolver = "2"
[workspace.package]
version = "5.0.0"
edition = "2021"
authors = ["IFC-Lite Contributors"]
license = "MPL-2.0"
repository = "https://github.com/LTplus-AG/ifc-lite"
[workspace.dependencies]
ifc-lite-core = { version = "5.0.0", path = "rust/core" }
ifc-lite-geometry = { version = "5.0.0", path = "rust/geometry" }
ifc-lite-processing = { version = "5.0.0", path = "rust/processing" }
ifc-lite-clash = { version = "5.0.0", path = "rust/clash" }
ifc-lite-export = { version = "5.0.0", path = "rust/export" }
ifc-lite-wasm = { version = "5.0.0", path = "rust/wasm-bindings" }
# Numeric-safety policy, inherited by every member via `[lints] workspace = true`.
# clippy must not auto-rewrite numeric literals or float comparisons: `.clamp()`,
# `RangeInclusive::contains`, and `partial_cmp` change NaN/panic behavior, and the
# precise literals in numeric code are intentional. Structure lints that only the
# geometry kernel needs are allowed in rust/geometry/Cargo.toml, not here, so the
# gate stays strict for the parser, server, and exporters.
[workspace.lints.clippy]
excessive_precision = "allow"
manual_range_contains = "allow"
manual_clamp = "allow"
neg_cmp_op_on_partial_ord = "allow"
approx_constant = "allow"
[profile.release]
opt-level = 3 # Optimize for speed
lto = true # Link-time optimization
codegen-units = 1 # Better optimization (slower compile)
strip = true # Strip symbols
panic = 'abort' # Smaller panic handler
overflow-checks = false # Remove overflow checks in release
[profile.release.package."*"]
opt-level = 3
strip = true
# Server-only release profile: re-enables stack unwinding so a panic while
# parsing untrusted, attacker-supplied IFC bytes on a `spawn_blocking` thread
# becomes a per-request `JoinError` (mapped to HTTP 500) instead of aborting
# the whole multi-tenant process. The default `release` profile keeps
# `panic = 'abort'` so the wasm bundle stays small.
# Built via `cargo build --profile server-release` (see apps/server/Dockerfile).
[profile.server-release]
inherits = "release"
panic = "unwind"
# Profiling profile: release-grade optimization with symbols retained and
# panic=unwind, so `samply record` on a profiled binary produces a symbolized
# flamegraph and per-element `catch_unwind` isolation still fires. Used by the
# `perf_probe` harness and `scripts/perf/flame.sh` (see `scripts/perf/README.md`).
# `strip`/`debug` override the release defaults; the rest is inherited.
[profile.profiling]
inherits = "release"
strip = false
debug = "line-tables-only"
panic = "unwind"
[profile.dev.package.bnum]
opt-level = 3
[profile.dev.package.num-bigint]
opt-level = 3
[profile.dev.package.num-rational]
opt-level = 3
[profile.dev.package.ifc-lite-geometry]
opt-level = 3