Skip to content
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

Add pypy wheels? #617

Open
LarsDu opened this issue Mar 9, 2025 · 5 comments
Open

Add pypy wheels? #617

LarsDu opened this issue Mar 9, 2025 · 5 comments

Comments

@LarsDu
Copy link

LarsDu commented Mar 9, 2025

I was looking at this project, and one thing that stood out to me was that this project could probably support PyPy, but doesn't seem to publish pypy wheels for some reason.

This would be very nice to have, as one of the downsides of python compared to something like luajit is an incredible disadvantage in performance and speed, which pypy effectively solves.

Package managers like uv make it rather seamless to switch between pypy and cpython nowadays, so I don't think this will confuse most folks.

@LarsDu
Copy link
Author

LarsDu commented Mar 9, 2025

I tried tackling this myself: #618

@merwok
Copy link
Contributor

merwok commented Mar 10, 2025

one of the downsides of python compared to something like luajit is an incredible disadvantage in performance and speed

But pyxel is written with rust!

@LarsDu
Copy link
Author

LarsDu commented Mar 10, 2025

one of the downsides of python compared to something like luajit is an incredible disadvantage in performance and speed

But pyxel is written with rust!

Based on my reading of the source code, pyxel uses Rust bindings to SDL2 (which is written in C++) for draw calls, but your actual game logic is in python.

This means the game logic is going to generally be slower in most cases to Luajit. PyPy is Just In Time compiled just like luajit and has comparable performance. This means about a 6x to 800x performance improvement... useful for games that implement things like particle physics...

Publishing the pypy wheels for this package will make pyxel discoverable and downloadable for projects using pypy rather than cpython

@kitao
Copy link
Owner

kitao commented Mar 11, 2025

I actually once implemented PyPy support locally but decided to drop it due to the maintenance cost.

The Pyxel ecosystem works as follows:
• (Python) users can easily install and start using Pyxel.
• They can share their creations in pyxapp format or on the web (the latter being especially popular), allowing many people to play them.
• Those who want to distribute their applications commercially or as binaries can use the app2exe command (which utilizes PyInstaller) to package and distribute them.

Given this structure, I currently don’t see a clear use case or user demand for PyPy support.
Also, for the web version, JIT compilation is already handled by WASM.

@kitao
Copy link
Owner

kitao commented Mar 11, 2025

Just as there are people who create Pyxel packages for specific Linux distributions, it’s perfectly fine if another user decides to create a PyPy version of Pyxel. If it becomes extremely popular, I might even consider officially adopting it.

However, please understand that I can’t simply add new features or support additional platforms based solely on the reasoning that “it might be nice to have".

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

No branches or pull requests

3 participants