78 releases (30 stable)
new 3.0.0-alpha.1 | Apr 25, 2025 |
---|---|
2.2.4 | Apr 30, 2025 |
2.2.0 | Mar 24, 2025 |
1.8.1 | Feb 22, 2025 |
0.3.0 | Nov 7, 2023 |
#4 in Magic Beans
691 downloads per month
Used in mrdirector
355KB
7K
SLoC
Turbo Genesis SDK
A flexible Rust SDK for building WebAssembly–powered games on the Turbo, with first-class support for graphics, audio, input, and netcode.
🌟 Features
- Canvas (
canvas
): 2D drawing primitives, layers, text - Audio (
audio
): load/play/loop audio assets - Input (
input
): keyboard, mouse, touch, gamepad - HTTP (
http
): fetch, post, JSON convenience - System (
sys
,os
,bounds
,tween
): console logging, timing, tween animations, safe bounds checks
🚀 Getting Started
-
Install Turbo
curl -sSfL https://turbo.computer/install.sh | sh
Make sure you also have the wasm target installed as well
rustup target add wasm32-unknown-unknown
You can find full install instructions on the Turbo Docs
-
Create your project
turbo init my-turbo-app
This will automatically add the SDK as a dependency in your project's
Cargo.toml
:[dependencies] turbo = { package = "turbo-genesis-sdk", version = "*" }
The SDK version will vary based on the version of
turbo
installed. It is best to ensure your on the latest version ofturbo
and the SDK when starting a new project. -
Write your code Open
src/lib.rs
and drop in:use turbo::prelude::*; turbo::go!({ // Clear the background with a hex color: clear(0xff00ffff); // Draw text to the screen: text!("Hello, Turbo!"); // Draw a rotated square: rect!(w = 50, h = 50, color = 0xffffffff, rotation_deg = 45); });
-
Run with Turbo
turbo run -w .
📖 Documentation
- Full API docs on docs.rs/turbo-genesis-sdk
- Turbo docs on docs.turbo.computer
📜 License
This project is licensed under MIT. See LICENSE for details.
Dependencies
~3–13MB
~159K SLoC