Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions web/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
[serve]
addresses = ["127.0.0.1"]
port = 8001

# Post-build: separate DWARF debug info into .debug.wasm files, then strip+optimize the served binaries.
# Chrome DevTools (with C/C++ DWARF extension) can load the .debug.wasm files for debugging.
[[hooks]]
stage = "post_build"
command = "sh"
command_arguments = [
"-c",
"for f in \"${TRUNK_STAGING_DIR}\"/*.wasm; do cp \"$f\" \"${f%.wasm}.debug.wasm\" && wasm-opt --strip-dwarf -Oz \"$f\" -o \"$f\"; done",
]
9 changes: 5 additions & 4 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
<link rel="preconnect" href="https://cdnjs.cloudflare.com" crossorigin />

<!-- Trunk: Main app binary -->
<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="0" data-bin="schema_analysis_web" data-type="main"
data-keep-debug="true" data-inline />
<!-- wasm-opt -Oz -g: optimize for size, keep the names section so in-browser stack traces stay symbolicated. -->
<link data-trunk rel="rust" href="Cargo.toml" data-bin="schema_analysis_web" data-type="main"
data-wasm-opt="z" data-wasm-opt-params="-g" data-inline />

<!-- Trunk: Worker binary -->
<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="0" data-bin="worker" data-type="worker" data-bindgen-target="web"
data-keep-debug="true" data-inline />
<link data-trunk rel="rust" href="Cargo.toml" data-bin="worker" data-type="worker" data-bindgen-target="web"
data-wasm-opt="4" data-wasm-opt-params="-g" data-inline />

<!-- Trunk: CSS -->
<link data-trunk rel="css" href="normalize.css" data-inline />
Expand Down
Loading