Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
194 lines (171 loc) · 9.45 KB
/
Copy pathCargo.toml
File metadata and controls
194 lines (171 loc) · 9.45 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
[workspace]
resolver = "3"
members = ["crates/*", "apps/*", "xtask"]
[workspace.package]
version = "0.9.1"
edition = "2024"
license = "MIT OR Apache-2.0"
rust-version = "1.95"
authors = ["FieldCraft contributors"]
repository = "https://github.com/tangency-labs/fieldcraft"
[workspace.dependencies]
# internal
fieldcraft-model = { path = "crates/model" }
fieldcraft-parallel = { path = "crates/parallel" }
fieldcraft-geometry = { path = "crates/geometry" }
fieldcraft-mesh = { path = "crates/mesh" }
fieldcraft-decks = { path = "crates/decks" }
fieldcraft-io = { path = "crates/io" }
fieldcraft-fem = { path = "crates/fem" }
fieldcraft-solver = { path = "crates/solver" }
fieldcraft-fcm = { path = "crates/fcm" }
fieldcraft-explicit = { path = "crates/explicit" }
fieldcraft-lbm = { path = "crates/lbm" }
fieldcraft-engine = { path = "crates/engine" }
fieldcraft-testkit = { path = "crates/testkit" }
fieldcraft-render = { path = "crates/render" }
fieldcraft-ui-egui = { path = "crates/ui-egui" }
fieldcraft-mcp = { path = "crates/mcp" }
fieldcraft-update = { path = "crates/update" }
fieldcraft-gpu = { path = "crates/gpu" }
fieldcraft-lbm-gpu = { path = "crates/lbm-gpu" }
fieldcraft-mesh-gpu = { path = "crates/mesh-gpu" }
# foundation
thiserror = "2"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["float_roundtrip", "raw_value"] }
log = "0.4"
# Complex scalars for the complex-symmetric solves (MIT OR Apache-2.0; docs/adr/0001-libraries.md).
num-complex = "0.4"
# Pure-Rust maths (a port of musl's libm) for the transcendental functions that place nodes or
# decide a mesh: the same bits on every platform, where the system library's (macOS libm, glibc)
# are not correctly rounded and differ in the last bits (#438, #115).
libm = "0.2"
# std::time::Instant on the web too (already in the tree through egui).
web-time = "1.1"
# The machine's physical memory, which bounds how far a fluid solve's memory caps may be raised
# (docs/adr/0001-libraries.md). Memory only; the desktop and CLI builds, not the browser.
sysinfo = { version = "0.40", default-features = false, features = ["system"] }
# xtask: reading Rust sources as syntax trees (`cargo xtask unit-factors`)
syn = { version = "3", default-features = false, features = ["full", "parsing", "visit"] }
proc-macro2 = { version = "1", default-features = false, features = ["span-locations"] }
# 3MF packages (docs/formats/tagged-mesh.md). The same zip line as SolidCraft, so one is built.
zip = { version = "9", default-features = false, features = ["deflate"] }
quick-xml = "0.42"
# content hashes and part checksums of .fieldcraft files (the version SolidCraft uses)
sha2 = "0.11"
# images (PNG snapshots and screenshots)
png = "0.18"
# ui: the same egui/eframe/egui-wgpu line as SolidCraft
egui = "0.37"
eframe = { version = "0.37", default-features = false }
egui-wgpu = "0.37"
# the wgpu egui-wgpu uses, for the offscreen viewport (crates/gpu); backends come per target there
wgpu = { version = "30", default-features = false, features = ["std", "wgsl"] }
pollster = "1.0"
# SolidCraft's UI kit, the token contract it draws from and SolidCraft's look (its icons, glyphs,
# interface faces and built-in themes): the desktop UI draws with them. Under the SolidCraft Brand
# and Interface Licence, used by the maintainer's written permission (docs/adr/0001-libraries.md);
# only fieldcraft-ui-egui uses them. The same commit as the geometry crates below.
solidcraft-ui-kit = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
solidcraft-theme = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
solidcraft-look = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
# The kit's widget registry (where its widgets were drawn, by name; MIT OR Apache-2.0): the UI
# reads the application bar's parts from it and clears it as each frame starts.
solidcraft-ui-registry = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
# The kit's message catalogues (MIT OR Apache-2.0): FieldCraft installs its own English text for
# the kit's message ids (crates/ui-egui/locales/en.json).
solidcraft-ui-text = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
# Panel placement core used by solidcraft-ui-kit::panel_runtime (MIT OR Apache-2.0): layouts,
# zones, persistence envelopes, and validation.
solidcraft-panel-layout = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
# native file pickers (the desktop app only; the UI crate takes them as services)
rfd = "0.17"
# The installed fonts, for a character the interface's faces lack (the desktop only, #991; MIT,
# pure Rust). Without fontconfig, so it adds no system library, and without memmap: a file read,
# not mapped, so one truncated meanwhile cannot fault. skrifa, which egui draws with, reads the
# characters each face maps, so the provider and egui agree on them.
fontdb = { version = "0.24", default-features = false, features = ["std", "fs"] }
skrifa = { version = "0.44", default-features = false, features = ["std"] }
# Geometry: SolidCraft's B-rep kernel (MIT OR Apache-2.0), pinned at a commit of its main branch
# (tag v0.51.2, which contains the relicence 615a4adc1f: docs/architecture.md, "SolidCraft pin"). Its
# modelling kernel is solidcore (Apache-2.0), vendored in SolidCraft's repository. Only
# crates/geometry uses it (docs/adr/0001-libraries.md).
solidcraft-geom = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
solidcraft-kernel = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
solidcraft-doc = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
solidcraft-io = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
# Runs SolidCraft command scripts (the test corpus recipes); only behind fieldcraft-geometry's
# `scripts` feature. Without its default `plugins` feature (from v0.42, a sandboxed WebAssembly
# plugin host on wasmtime): the recipes are plain command scripts and never load a plugin.
solidcraft-engine = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2", default-features = false }
# The geometry records SolidCraft's API speaks in (points, planes, profiles): solidcore's record
# crate (Apache-2.0), from the copy of solidcore SolidCraft vendors (its `solidcore/`), at the same
# rev as the crates above, so the build carries one copy of it and the types match.
solidcore-record = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
# solidcore's tessellator (Apache-2.0), same copy and tag: the analysis meshes of the B-rep faces
# (`solidcore_tess::mesh`) that fieldcraft-geometry hands the volume meshers.
solidcore-tess = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
[workspace.lints.rust]
unsafe_code = "forbid"
[workspace.lints.clippy]
dbg_macro = "warn"
todo = "warn"
too_many_arguments = "allow"
type_complexity = "allow"
# `!(x > tol)` is our idiom for "not a usable number" (NaN-safe).
neg_cmp_op_on_partial_ord = "allow"
[profile.dev.package."*"]
opt-level = 2
[profile.dev]
opt-level = 1
# The lattice Boltzmann kernels are compute loops over millions of cells; their verification
# runs (tests) need them optimised.
[profile.dev.package.fieldcraft-lbm]
opt-level = 3
# Meshing and the sparse solver are compute loops too: the tet quality stage and the
# mesh-convergence oracle cases (tests/oracle) run in tests.
[profile.dev.package.fieldcraft-mesh]
opt-level = 3
[profile.dev.package.fieldcraft-solver]
opt-level = 3
# Tests and lints (`cargo xtask ci`, GitHub CI). Debug assertions are off, as SolidCraft builds
# its tests.
[profile.ci]
inherits = "dev"
opt-level = 1
debug = "line-tables-only"
debug-assertions = false
overflow-checks = true
incremental = false
[profile.ci.package."*"]
opt-level = 2
[profile.ci.package.fieldcraft-lbm]
opt-level = 3
[profile.ci.package.fieldcraft-mesh]
opt-level = 3
[profile.ci.package.fieldcraft-solver]
opt-level = 3
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 16
debug = "line-tables-only"
# SolidCraft builds vendored egui 0.37 crates and winit with local fixes (its vendor/ directory).
# Patches don't reach a dependent workspace, so FieldCraft mirrors them from the same SolidCraft
# commit as the crates above: without them the workspace carries two copies of emath and epaint.
[patch.crates-io]
ecolor = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
eframe = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
egui = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
# egui-wgpu with SolidCraft's fixes (vendor/egui/crates/egui-wgpu): MSAA clamped to what the device
# supports and 1x on OpenGL adapters, so the requested 4x never fails pipeline validation at start.
egui-wgpu = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
egui-winit = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
egui_glow = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
emath = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
epaint = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
epaint_default_fonts = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }
# winit with SolidCraft's fix (vendor/winit there): trackpad pinch and rotation gestures on Wayland
# (zwp_pointer_gestures_v1), which winit 0.30 never binds.
winit = { git = "https://github.com/tangency-labs/solidcraft", tag = "v0.51.2" }