Repository navigation
Add macOS build support - #1
Open
peterpeerdeman wants to merge 1 commit into
Open
peterpeerdeman wants to merge 1 commit into
peterpeerdeman wants to merge 1 commit into
Conversation
Link against Homebrew SDL2 libs on macOS via .cargo/config.toml, and upgrade sdl2 crate to 0.38 so SDL3-numbered events leaked by sdl2-compat no longer abort the game on startup. Co-Authored-By: Claude Fable 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.
Hi Sebastiaan, waar het de vorige keer nog mislukte is het fable deze keer wel gelukt om samtris werkend te krijgen op mac os, onder andere omdat de dependency upstream gefixed was 😁
Summary
This makes the project build and run on macOS, where it previously failed to link.
.cargo/config.tomlwith Apple-target-only linker search paths for Homebrew-installed SDL2 libraries (brew install sdl2 sdl2_image sdl2_ttf). Linux builds are unaffected.sdl2crate from 0.37 to 0.38. Homebrew'ssdl2package is nowadays sdl2-compat (SDL2 API on top of SDL3), which delivers an SDL3-numbered event (0x207) during window creation on Retina displays. sdl2 0.37 converts raw event types with an uncheckedtransmute, which aborts on that value; 0.38 matches on the raw value and handles unknown events gracefully. No source changes were needed for the upgrade.Testing
cargo buildandcargo runon macOS 15 (Apple Silicon): game launches and plays without the previous startup abort.🤖 Generated with Claude Code