Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
126 lines (114 loc) · 3.83 KB
/
Copy pathCargo.toml
File metadata and controls
126 lines (114 loc) · 3.83 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
[package]
name = "monster-step-viewer"
version = "0.1.0"
authors = ["Moritz Moeller <virtualritz@protonmail.com>"]
edition = "2024"
rust-version = "1.89"
[[bin]]
name = "mstpv"
path = "src/main.rs"
# cargo-packager config. `cargo packager --release --formats dmg` (macOS) and
# `--formats wix` (Windows MSI) read this. Version is inherited from [package].
[package.metadata.packager]
product-name = "Monster STEP Viewer"
identifier = "io.github.virtualritz.monster-step-viewer"
publisher = "Moritz Moeller"
description = "STEP CAD viewer with an optional 3Delight path-traced overlay"
homepage = "https://github.com/virtualritz/monster-step-viewer"
copyright = "Copyright (c) 2026 Moritz Moeller"
icons = [
"assets/packaging/icon-512x512.png",
"assets/packaging/icon-256x256.png",
"assets/packaging/icon-128x128.png",
"assets/packaging/icon-32x32.png",
"assets/packaging/icon.ico",
]
binaries = [{ path = "mstpv", main = true }]
file-associations = [
{ extensions = [
"stp",
"step",
], mime-type = "application/step", description = "STEP CAD File" },
]
[package.metadata.packager.wix]
[package.metadata.packager.dmg]
[dependencies]
ahash = "0.8"
anyhow = "1"
bytemuck = "1"
bevy = { version = "0.19", default-features = false, features = [
"3d_bevy_render",
"default_app",
"default_platform",
"picking",
] }
bevy_egui = "0.42"
# No bevy 0.19 release yet; tracks the open upstream PR
# (aevyrie/bevy_editor_cam#66). Switch back to a crates.io version once it lands.
bevy_editor_cam = { git = "https://github.com/m-edlund/bevy_editor_cam.git", branch = "bevy-0.19" }
futures-lite = "2"
glam = "0.33"
log = "0.4"
parking_lot = "0.12"
rayon = "1"
rfd = "0.17"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
dirs = "7"
ehttp = "0.7"
monstertruck = { version = "0.4", features = [
"step",
"meshing",
"solid",
"modeling",
] }
[dev-dependencies]
env_logger = "0.11"
# meshopt wraps the C++ meshoptimizer library. Keep it native-only for now;
# the wasm build still gets indexed meshes, just without the
# vertex-cache/vertex-fetch reordering.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
arboard = "3"
meshopt = "0.6"
png = "0.18"
# NSI live rendering (3Delight). Optional, native-only. Pins the same git rev as
# akatela's NSI integration, which we model the BRep export on.
nsi = { git = "https://github.com/virtualritz/nsi.git", features = [
"output",
], optional = true }
crossbeam = { version = "0.8", optional = true }
# Track monstertruck's `main` rather than the crates.io release. The sibling
# `monstertruck-*` crates resolve from the same checkout via their path deps, so
# a single entry covers the whole workspace.
[patch.crates-io]
monstertruck = { git = "https://github.com/virtualritz/monstertruck.git" }
[features]
default = []
# Writes standalone `.nsi` files. Native-only and independent from live
# rendering.
nsi-export = []
# Reproducer build: keeps trim curves on their original parameter lap even
# when that escapes the surface's declared domain. 3Delight clamps rather than
# wrapping those, which renders as wedge slivers on cylinders; this exists so
# `nsi-export` can emit an `.nsi` demonstrating it upstream. Never enable for
# normal rendering.
nsi-out-of-domain-trims = []
# Renders trimmed NURBS surfaces via 3Delight (NSI) and overlays the result
# in the viewport. Native-only; requires 3Delight installed locally
# (`/usr/local/3delight/...` or `$DELIGHT`).
nsi-render = ["dep:nsi", "dep:crossbeam"]
# Native release: maximum perf.
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
# WASM release: smaller binary, faster link. Trunk.toml selects this via
# `cargo_profile`.
[profile.wasm-release]
inherits = "release"
opt-level = 2
lto = "thin"
codegen-units = 16
# Optimize all dependencies even in debug builds:
[profile.dev.package."*"]
opt-level = 2