One tool to install
The CPython and raylib browser runtime is included. You do not need to install Emscripten or compile raylib yourself.
Python raylib → Web
Rayport packages Python raylib games as static files that run directly in a browser. No separate raylib installation. No compiler setup.
from raylib import * InitWindow(800, 600, b"Hello") while not WindowShouldClose(): BeginDrawing() ClearBackground(RAYWHITE) DrawText(b"Hello, web!", 260, 280, 32, RED) EndDrawing()
Why Rayport
Your source stays Python. Rayport brings the browser runtime, finds the files your project needs, and produces a folder you can put on any static web host.
The CPython and raylib browser runtime is included. You do not need to install Emscripten or compile raylib yourself.
Use the development server while you work. Rayport rebuilds when project files change and serves the result locally.
The final build is ordinary static web content. Upload it to your host without a Python server or application backend.
Rayport follows imports, includes project assets and pure Python dependencies, and explains what will be packaged.
Get started
Rayport expects a main.py entry point. Your images, sounds, modules, and other files can stay beside it in the project.
Install
Install it as an isolated command-line tool with uv.
uv tool install rayport Develop
Start the development server from your game directory.
rayport dev . Build
Upload the contents of dist/ to any static web server.
rayport build . --output dist ├── main.py
├── rayport.toml
├── game/
│ ├── player.py
│ └── level.py
└── assets/
├── sprites.png
└── music.oggOptional configuration
Add rayport.toml to set the page title, background, presentation mode, and packaging rules.
[web] title = "My Game" presentation = "fit" background = "#111114"See configuration options →
Example game
Breakout is written in Python with raylib, then packaged as static web files by Rayport.
Current compatibility
Ready to port?