Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
58 lines (49 loc) · 2.18 KB
/
Copy pathCargo.toml
File metadata and controls
58 lines (49 loc) · 2.18 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
[package]
name = "sdof_dynamics"
version = "0.2.0"
edition = "2021"
description = "Interactive single-degree-of-freedom (mass-spring-damper) dynamics explorer."
authors = ["Basem Rajjoub <basem.rajjoub@iwes.hannover-uni.de>"]
license = "MIT"
default-run = "sdof_dynamics"
# ══════════════════════════════════════════════════════════════════════════════
# SDOF Dynamics Explorer — IWES / LUH
#
# Native build (with MathJax-rendered theory panel):
# cargo build --release (build only)
# cargo run --release (build + launch)
#
# Web (WASM) build (no MathJax — falls back to plain text equations):
# cargo build --target wasm32-unknown-unknown --release --bin sdof_dynamics_web --no-default-features
# tools/wasm-bindgen-0.2.114-x86_64-pc-windows-msvc/wasm-bindgen.exe \
# --target web --out-dir dist/web \
# target/wasm32-unknown-unknown/release/sdof_dynamics_web.wasm
# ══════════════════════════════════════════════════════════════════════════════
[dependencies]
eframe = { version = "0.29", features = ["wgpu"] }
egui_plot = "0.29"
image = { version = "0.25", default-features = false, features = ["png"] }
web-sys = "0.3"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
# Heavy deps — only enabled by the `mathjax` feature (native build only)
mathjax_svg = { version = "3.1", optional = true }
resvg = { version = "0.44", optional = true }
[features]
default = ["mathjax"]
mathjax = ["mathjax_svg", "resvg"]
# ── Binary targets ──
# Native desktop binary (Windows: GUI subsystem, no console window)
[[bin]]
name = "sdof_dynamics"
path = "apps/sdof_dynamics.rs"
required-features = ["mathjax"]
# WebAssembly binary (no MathJax — pure egui rendering)
[[bin]]
name = "sdof_dynamics_web"
path = "apps/sdof_dynamics.rs"
[profile.release]
opt-level = 3
lto = "thin"