-
Notifications
You must be signed in to change notification settings - Fork 66
Add pygame-ce recipe for emscripten-wasm32 with cross-compilation support and upstream patch #2891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@copilot try again |
Co-authored-by: DerThorsten <[email protected]>
I've created the pygame-ce recipe for emscripten-wasm32. The recipe includes:
The recipe is now ready for testing. Commit: 349ca5c Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@copilot fix |
Co-authored-by: IsabelParedes <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot add an emscripten.meson.cross file
Co-authored-by: IsabelParedes <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot enable cross-compilation
../meson.build:1:0: ERROR: Emscripten compiler can only be used for cross compilation.
Co-authored-by: IsabelParedes <[email protected]>
... Fixed the cross-compilation issue by properly configuring the meson cross-file. Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot create a patch for fix
../meson.build:38:4: ERROR: Problem encountered: The meson buildconfig of pygame-ce does not support emscripten for now. However it may be added in the future
Co-authored-by: IsabelParedes <[email protected]>
... Created a patch to fix the emscripten support issue. Changed the error() call to warning() in pygame-ce's meson.build file to allow building for WebAssembly. The patch specifically targets the emscripten check at line 38 and enables experimental emscripten support. Commit: a2267a4 |
This PR adds a complete pygame-ce recipe for building the pygame Community Edition on the emscripten-wasm32 platform (WebAssembly).
The recipe includes:
emscripten.meson.cross
file and proper cross-file configuration to enable cross-compilation for WebAssemblyThe build process leverages emscripten's built-in SDL2 ports and uses the standard meson cross-compilation workflow for Python extensions targeting WebAssembly. The cross-compilation configuration ensures meson properly detects this as a cross-compilation build, resolving the "Emscripten compiler can only be used for cross compilation" error. The patch addresses pygame-ce's upstream restriction that prevents building for emscripten by modifying the build system to allow experimental WebAssembly support.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.