Files
dioxus/.gitignore
T
Jonathan Kelley fb855b7088 fix: workspace hotpatch cache thrashing, feat: add compile profiling, cleanup + refactor + document cli request.rs file (#5479)
* it works!

* fix wasm hotpatch error

* bump wasmopt

* rename wasmopt flag

* rename ldd_keep_exports

* add build profiling

* undo bundle ignore

* some cleanups

* more cleanups

* wip: hoist up telemetry to builder

* fix compile

* wip: flamegraph rewrite

* clean up flamegraph impl

* cleanup profiling engine

* add comment on spans obj

* cleanup more phases

* more cleanup

* small cleanups

* bit more cleanups

* cleanup phases

* sign with tokio, not std proc

* split out the specific platform helpers

* cleanup a bit

* more cleanups

* more cleanups

* more cleanups

* more cleanups

* pull out fingerprint logic

* wip... I think I have a slightly better approach. saving checkpoint

* hm I think it's better now?

* fix: also seems to work not in workspace mode juuust yet

* okay yay almost there

* clooose but not there yet

* fix: manually export __wasm_apply_data_relocs since got relocations weren't firing

WASM workspace hotpatching: export __wasm_apply_global_relocs to fix call_indirect type mismatch

When workspace crates are recompiled with -Crelocation-model=pic for hotpatching, wasm-ld generates GOT.func.internal globals that hold element-segment-relative offsets (e.g., MetricCardProps::memoize = 31). These need __table_base added at runtime by __wasm_apply_global_relocs to become absolute table indices.

wasm-ld generates __wasm_apply_global_relocs but treats it as an internal synthetic function -- neither --export nor --export-if-defined will export it. Without the export, the runtime's call silently failed (the old code used unchecked_into on undefined), leaving the globals unrelocated. Function pointers then pointed to index 31 in the original module's table (some unrelated function) instead of table_base + 31 (the patched function), causing call_indirect to a signature that does not match.

Three changes:

patch.rs: After walrus processing, find __wasm_apply_global_relocs by name and add it as an export before emitting the patched wasm.
lib.rs: Replace unchecked_into with dyn_into for calling relocation functions, so missing exports are handled gracefully instead of silently swallowed.
link.rs: Remove the ineffective --export-if-defined flags that were added during debugging.

* cleanup

* fix scope dir

* change up naming a bit

* more tidying up

* more cleanups

* ignore early return

* clean er up

* more comprehensive cache bustign

* bust fingerprints of dag

* move bust_fingerprint back to request.rs

* add better rustdoc

* more idiomatic

* more cleanups

* fix panic, typos

* more lints

* only delete workspace prints in fat mod

* clippy
2026-04-14 12:09:49 -07:00

44 lines
1.0 KiB
Plaintext

.dioxus
/target
/packages/playwright-tests/cli-optimization/monaco-editor-0.52.2
/packages/playwright-tests/web/dist
/packages/playwright-tests/fullstack/dist
/packages/playwright-tests/test-results
/packages/playwright-tests/web-hot-patch-temp
/packages/playwright-tests/web-hot-patch-fullstack-temp
/packages/playwright-tests/web-hot-patch/Cargo.lock
/packages/playwright-tests/web-hot-patch-fullstack/Cargo.lock
/dist
.DS_Store
/examples/assets/test_video.mp4
/examples/_assets/test_video.mp4
static
# new recommendation to keep the lockfile in for CI and reproducible builds
# Cargo.lock
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
tarpaulin-report.html
# Jetbrain
.idea/
node_modules/
/test-results/
/packages/playwright-report/
/packages/playwright/.cache/
# Allow geolocation plugin sources to be tracked
/packages/geolocation/android/build/
/packages/geolocation/android/.gradle/
# Zed
.zed/
# ignore the output of tmps
tmp/
# in debugging we frequently dump wasm to wat with `wasm-tools print`
*.wat