Repository navigation
fix: Windows release compiles again; the frost mage is the window icon - #29
Merged
Merged
Conversation
… 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>
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-comparedflipargument. Linux and macOS compile the same code fine.The change
src/scene/owl.rs: pick the wing frame by index (same idiom asCUBE_FRAMESinice.rs). One line, same behaviour.release.yml: remove the 16–32 GB page file andCARGO_BUILD_JOBS=1added 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):The same one-line rewrite also built the full lib on
windows-latestin the probe run 38274351889: the job namedframes by indexsucceeded in 4m05s, while the other two rewrites still ran out of memory.The
ciworkflow 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 totee, which Windows does not have; it fails the same way without this PR.--mode windowwith the icon set on its window.🤖 Generated with Claude Code