Skip to content

Commit

Permalink
Allow stepping through the Rust code
Browse files Browse the repository at this point in the history
This allows stepping through the Rust code. `wasm-bindgen` 0.2.89 just
got released and it finally properly allows keeping the debug symbols
that Rust creates around fully. Thankfully `webpack` does not pose a
problem here and the debug symbols now properly work in Chrome, allowing
us to step through the Rust code in the developer tools.
  • Loading branch information
CryZe committed Nov 30, 2023
1 parent 6139d06 commit e5b834d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion buildCore.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ let toolchain = "";
let targetFolder = "debug";
let cargoFlags = "";
let rustFlags = "-C target-feature=+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext,+simd128";
let wasmBindgenFlags = "";

// Do an optimized build.
if (process.argv.some((v) => v === "--release")) {
targetFolder = "release";
cargoFlags = "--release";
} else {
wasmBindgenFlags += " --keep-debug";
}

// Do a fully optimized build ready for deployment.
Expand Down Expand Up @@ -66,7 +69,7 @@ execSync(
);

execSync(
`wasm-bindgen livesplit-core/target/wasm32-unknown-unknown/${targetFolder}/livesplit_core.wasm --out-dir src/livesplit-core`,
`wasm-bindgen ${wasmBindgenFlags} livesplit-core/target/wasm32-unknown-unknown/${targetFolder}/livesplit_core.wasm --out-dir src/livesplit-core`,
{
stdio: "inherit",
},
Expand Down
2 changes: 1 addition & 1 deletion livesplit-core
Submodule livesplit-core updated 82 files
+5 −0 .github/dependabot.yml
+26 −90 .github/workflows/build.yml
+16 −8 Cargo.toml
+9 −4 crates/livesplit-auto-splitting/Cargo.toml
+283 −45 crates/livesplit-auto-splitting/README.md
+286 −48 crates/livesplit-auto-splitting/src/lib.rs
+52 −1 crates/livesplit-auto-splitting/src/process.rs
+1,195 −107 crates/livesplit-auto-splitting/src/runtime.rs
+0 −80 crates/livesplit-auto-splitting/src/settings.rs
+38 −0 crates/livesplit-auto-splitting/src/settings/gui.rs
+200 −0 crates/livesplit-auto-splitting/src/settings/list.rs
+186 −0 crates/livesplit-auto-splitting/src/settings/map.rs
+26 −0 crates/livesplit-auto-splitting/src/settings/mod.rs
+34 −0 crates/livesplit-auto-splitting/src/settings/value.rs
+6 −6 crates/livesplit-auto-splitting/tests/sandboxing.rs
+25 −7 crates/livesplit-hotkey/Cargo.toml
+73 −1 crates/livesplit-hotkey/src/key_code.rs
+18 −2 crates/livesplit-hotkey/src/linux/mod.rs
+17 −1 crates/livesplit-hotkey/src/macos/mod.rs
+11 −2 crates/livesplit-hotkey/src/other/mod.rs
+14 −1 crates/livesplit-hotkey/src/wasm_web/mod.rs
+21 −5 crates/livesplit-hotkey/src/windows/mod.rs
+1 −2 crates/livesplit-title-abbreviations/src/lib.rs
+495 −37 src/auto_splitting/mod.rs
+5 −3 src/component/blank_space.rs
+1 −1 src/component/current_comparison.rs
+1 −1 src/component/current_pace.rs
+1 −1 src/component/delta/mod.rs
+1 −1 src/component/detailed_timer/mod.rs
+1 −1 src/component/graph.rs
+1 −1 src/component/key_value.rs
+1 −1 src/component/pb_chance.rs
+1 −1 src/component/possible_time_save.rs
+1 −1 src/component/previous_segment.rs
+1 −1 src/component/segment_time/mod.rs
+1 −1 src/component/separator.rs
+1 −1 src/component/splits/column.rs
+1 −1 src/component/splits/mod.rs
+8 −6 src/component/sum_of_best.rs
+1 −1 src/component/text/mod.rs
+3 −3 src/component/timer.rs
+1 −1 src/component/title/mod.rs
+1 −1 src/component/total_playtime.rs
+1 −1 src/hotkey_config.rs
+8 −6 src/layout/component_settings.rs
+6 −4 src/layout/component_state.rs
+2 −3 src/layout/editor/state.rs
+1 −1 src/layout/general_settings.rs
+1 −1 src/layout/layout_direction.rs
+1 −1 src/layout/layout_settings.rs
+1 −1 src/layout/layout_state.rs
+3 −4 src/layout/parser/font_resolving/gdi.rs
+1 −1 src/layout/parser/font_resolving/name.rs
+1 −0 src/platform/no_std/time.rs
+64 −36 src/platform/normal/mod.rs
+2 −0 src/platform/wasm/unknown/time.rs
+1 −1 src/rendering/default_text_engine/color_font/colr.rs
+1 −1 src/rendering/default_text_engine/color_font/cpal.rs
+1 −1 src/rendering/mod.rs
+1 −1 src/run/editor/state.rs
+1 −1 src/run/linked_layout.rs
+1 −1 src/run/parser/flitter/mod.rs
+1 −1 src/run/parser/source_live_timer.rs
+1 −1 src/run/parser/speedrun_igt.rs
+1 −1 src/run/parser/splits_io.rs
+1 −1 src/run/parser/splitterino.rs
+1 −1 src/run/parser/splitty.rs
+1 −1 src/run/parser/urn.rs
+1 −1 src/run/run_metadata.rs
+1 −1 src/settings/alignment.rs
+1 −1 src/settings/field.rs
+1 −1 src/settings/font.rs
+1 −1 src/settings/gradient.rs
+1 −1 src/settings/image/shrinking.rs
+1 −1 src/settings/semantic_color.rs
+1 −1 src/settings/settings_description.rs
+1 −1 src/settings/value.rs
+1 −1 src/timing/formatter/accuracy.rs
+1 −1 src/timing/formatter/digits_format.rs
+1 −1 src/timing/timing_method.rs
+1 −1 src/util/byte_parsing.rs
+55 −78 tests/rendering.rs

0 comments on commit e5b834d

Please sign in to comment.