Choosing a stack: Rust + raylib, Flutter, or porting
Which stack to pick for a Gizlet game, controller-first app, background service, or Linux port—with real example repositories and the standard scripts/dev.sh workflow.
Gizlet OS runs native arm64 Linux programs over DRM/KMS and OpenGL ES 3.0. Choosing a stack that fits the RK3326 handheld's hardware (1.5 GHz quad Cortex-A35, Mali-G31 MP2, 1 GB RAM) saves weeks of fighting performance or packaging later.
1. Rust + raylib (Recommended for games & lightweight native apps)
This is the primary, best-tested path on Gizlet OS—and the stack the handheld Launcher itself uses.
- Best for: 2D games, lightweight 3D games, controller-first tools, and service settings screens.
- Why it fits: Gizlet OS Runtime 1 ships
libraylib.so.600, glibc, Mesa (Panfrost) and shared Gizlet Sans fonts, so your.gzlstays tiny. Pairing it with gizlet/rayui gives you Launcher-grade focus navigation, dark/light tokens, and UI sounds, while gizlet/device-input handles evdev, A/B swap, desktop remapping and browser play with one rule set. - Same code across platforms: Targets Gizlet OS (
aarch64-unknown-linux-gnu), macOS (Apple Silicon & Intel), Windows x64, and browser (wasm32-unknown-emscripten). - Real examples: gizlet/overeaten (3D + web + desktop), gizlet/rayui-gallery (minimal rayui app), li3g/little-prince (3D + storybook).
- Performance guardrails: Read the Rust + raylib handheld performance reference before drawing complex UI or 3D scenes.
2. Flutter + flutter_gizlet (Rich UI & media apps)
- Best for: Content-rich controller apps, media players, or bringing an existing Flutter app to Gizlet OS.
- How it runs: Packages your Flutter app with a
flutter-piDRM/KMS runner via gizlet/flutter_gizlet. The runner maps the D-pad to arrow keys, A to Enter and B to Escape (with A/B swap already applied—do not swap again). - Important caveats today: The runner in
flutter_gizlet0.1.0 needs the gamepad-input patch (and media patch for GStreamervideo_player) shown in gizlet/live, and builds on an ARM64 Linux CI runner. Keepversioningizlet.tomlat three numbers (X.Y.Z).
3. C / C++ / Go ports and Bun scripts
- Engine and open-source ports: Native C/C++ games or emulators can bundle their own Debian snapshot runtime or link Runtime 1. See gizlet/supertux (Bazel port) or gizlet/browser. Note that heavy engines like Godot 4 run around 0.8–1.5 FPS on RK3326 (see the archived
gizlet/tanks-of-freedom-iibenchmark) and are not viable for 30–60 FPS games. - Background services (
kind = "service"): Go or Rust static/dynamic binaries work well for systemd services (see gizlet/tailscale), paired with a small Rust + raylib full-screensettingsbinary. - Scripts: Gizlet OS rootfs includes Bun at
/usr/bin/bun, which works cleanly for lightweight CLI helpers and glue scripts.
One standard command entry point: scripts/dev.sh
Whichever stack you choose, put a thin scripts/dev.sh adapter in your repo so both humans and CI call the same four commands:
./scripts/dev.sh run # Desktop prototype with keyboard & controller
./scripts/dev.sh build # Local build using committed lockfiles
./scripts/dev.sh test # Automated tests without a physical handheld
./scripts/dev.sh package # Build .gzl packages into dist/
In CI, gizlet/.github/.github/actions/version@latest writes the release version into gizlet.toml right after checkout, so scripts/dev.sh package should always read version from gizlet.toml without hard-coding suffixes.
Next: plan your gameplay and screen flow in Designing games and apps for retro handhelds, or check the full Gizlet repository map.