Skip to content

fix: Windows release compiles again; the frost mage is the window icon - #29

Merged
machado144 merged 3 commits into
mainfrom
fix/win-release-oom
Oct 13, 2026
Merged

machado144 merged 3 commits into
mainfrom
fix/win-release-oom

Conversation

@machado144

@machado144 machado144 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What was wrong

The Windows release build has failed since v0.1.5 with rustc-LLVM ERROR: out of memory. It is not a real memory need: rustc's Windows codegen goes into a runaway allocation on one tiny function, Owl::draw.

The trigger is the wing frame chosen with if … { WINGS_UP } else { WINGS_DOWN } together with the float-compared flip argument. Linux and macOS compile the same code fine.

The change

  • src/scene/owl.rs: pick the wing frame by index (same idiom as CUBE_FRAMES in ice.rs). One line, same behaviour.
  • release.yml: remove the 16–32 GB page file and CARGO_BUILD_JOBS=1 added in 1cb1b9d. They did not help (v0.1.6 failed the same way) and only slow the Windows build. The file is now identical to v0.1.4, the last release that shipped.

Evidence

Minimal crate with only canvas.rs + owl.rs, cargo build --release --lib, rustc 1.99.0 (same as the runner):

Windows (msvc) Linux (gnu) macOS (arm64)
before runaway, 13.8 GB in 7 s (killed) ok, 9 MB not run
after ok, 11 MB, 0.3 s ok ok

The same one-line rewrite also built the full lib on windows-latest in the probe run 38274351889: the job named frames by index succeeded in 4m05s, while the other two rewrites still ran out of memory.

The ci workflow is dispatched on this branch: 38452453120.

Also: the frost mage as the window icon

  • scene/mage.rs: portrait() draws the mage standing with his staff on a clear 32x32 square, reusing the existing sprite and draw code (one test).
  • app/mod.rs: the main window (window mode) and the panel use it as their window icon.

Built and run on Windows (local, rustc 1.99.0)

  • cargo build --release --locked: 103 s, rustc peak 2.1 GB (16 cores). Before the fix this never finished.
  • cargo test --release --locked --no-fail-fast: 509 lib tests + 26 CLI tests pass. One lib test fails, command_engine_passes_text_on_stdin_when_not_in_the_template, because it shells out to tee, which Windows does not have; it fails the same way without this PR.
  • The built app opens in --mode window with the icon set on its window.
    🤖 Generated with Claude Code

machado144 and others added 2 commits October 13, 2026 16:08
… again

* rustc ran out of memory on Windows compiling Owl::draw (v0.1.5 and v0.1.6
  never shipped): `if … { WINGS_UP } else { WINGS_DOWN }` plus the
  float-compared flip sends its codegen into a runaway allocation
* reproduced with canvas.rs + owl.rs alone: 13 GB in 7 s before, 11 MB after
* release.yml: drop the page file and CARGO_BUILD_JOBS=1, they did not help

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* scene/mage.rs: `portrait()` draws him standing with his staff on a clear
  32x32 square, from the sprite and draw code already there
* main window (window mode) and the panel use it: title bar, taskbar, Alt+Tab

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@machado144 machado144 changed the title fix(scene): owl wing frames by index, so the Windows release compiles again fix: Windows release compiles again; the frost mage is the window icon Oct 13, 2026
…ritten for

* the short-Spanish-word test (a19bd20) never ran in CI; on tiny, whisper
  hears the word Ayuda as something else
* base is also the app's default model

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@machado144
machado144 merged commit 80dd7b4 into main Oct 13, 2026
2 checks passed
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