Skip to content

build: add Windows x86_64 support - #2

Merged
monteslu merged 13 commits into
mainfrom
fix/windows-x86-build
Jul 29, 2026
Merged

monteslu merged 13 commits into
mainfrom
fix/windows-x86-build

Conversation

@monteslu

Copy link
Copy Markdown
Owner

Adds and verifies the Windows x86_64 build path using the MSVC ABI.

  • links scriptc, Skia, SDL2, and webaudio with a consistent MSVC runtime
  • stages SDL2 and Skia ICU runtime assets beside the executable
  • adds a Windows CI job that builds, links, launches, and runs the headless canvas conformance test
  • updates the workflow actions to Node 24-compatible versions
  • avoids passing empty strings into Skia text layout

Verified by the green Windows run: https://github.com/monteslu/scriptc-game/actions/runs/30494640430

monteslu added 13 commits July 29, 2026 13:51
measureText("") segfaults natively and HANGS under wasm. Both land inside
skiac_canvas_get_line_metrics_or_draw_text itself, confirmed under gdb:

  #0 skiac_canvas_get_line_metrics_or_draw_text ()
  #1 text_run(unsigned int, unsigned int, double, double, double) ()
  #2 sc_f__x25__x25_m13_Context2D_measureText ()

This is not an exotic input. Every text field measures the empty string
before the first keystroke -- that is how the caret gets positioned -- so a
wasmcart cart drawing a text-entry screen died on frame 2, and the two
symptoms diverging by platform made it look like an asyncify bug until it
bisected down to this one call. measureText("x") is fine either way.

The fix is an early return in text_run: all-zero metrics are the CORRECT
answer for an empty run, not a fallback. An empty string draws nothing,
occupies no width and has no bounding box, and g_metrics is already zeroed
on the line above. It sits ahead of the measure/draw split because drawing
an empty string is a no-op for the same reason.

textprobe gains the case, printing either side of the call so a hang and a
wrong number stay distinguishable in the log. Verified: native crashed
before, reports width=0 ascent=0 after, and measureText("q") still measures
15.23 as a control that the guard did not swallow real text.
@monteslu
monteslu merged commit 2c55959 into main Jul 29, 2026
5 checks passed
@monteslu
monteslu deleted the fix/windows-x86-build branch July 29, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant