NEOLearn

Platform support

Where NEO games run today, desktop, web, iOS and Android, how to build for each, and what differs between them.

Updated October 20, 2026

On this page

A NEO game is one codebase that builds for every platform. The parts that differ between platforms (where content and saves live, how the GPU is set up, how a browser starts the game) are in NEO's platform layer, neo_device, so game code doesn't change from one platform to the next.

Status#

PlatformStatusPackage with
macOSShipscargo xtask package --target macos: an .app in a zip.
WindowsShips--target windows: a zip, with the DirectX shader compiler linked in.
Linux x86_64 and arm64Ships--target linux or --target linux-arm64: a .tar.gz.
WebRuns--target web, then cargo xtask serve. WebAssembly with WebGL 2; touch controls in a phone's or tablet's browser.
iOSRuns in the Simulator--target ios: an ad-hoc signed Simulator .app with touch controls.
AndroidRuns in the emulator--target android: a debug-signed arm64 APK with touch controls.
PlayStation, Xbox, SwitchNot availableEach needs its platform holder's SDK and a graphics backend for it.

Every package goes to dist/. Without --target, cargo xtask package builds for the machine you're on. In the desktop Studio, Build mode does the same; see Publishing from the Studio.

Desktop#

The desktop is where you develop, and where every feature in this guide works. Rendering uses Metal on macOS, Vulkan or DirectX 12 on Windows, and Vulkan on Linux. If the preferred API has no usable GPU, the game tries the other APIs that are built in. Linux builds support both X11 and Wayland.

On Vulkan, the game keeps the driver's compiled pipelines in a cache file, so starts after the first skip most shader compilation.

Web#

A web build is the same game compiled to WebAssembly, drawn with WebGL 2. Games published from the Studio play this way on the platform. How to package and serve one, how it loads and what it reports are in Web builds.

What's different in the browser:

DifferenceWhat it means for your code
One threadSystems still run, one after another. Task pools run their tasks on the same thread. Work you would move to a background thread takes frame time instead.
WebGL 2No compute shaders or storage buffers. Features that need them aren't available; each rendering page says which.
No file systemContent downloads before the game starts. Files a loader opens itself must be on the game's web-preload list.
MemoryAt most 4 GB.
StartingThe page starts the game when the player clicks Play, so audio and pointer lock work. App::run doesn't return.
RandomnessA game crate needs the wasm_js backend of getrandom on wasm. Projects made from a template already have it.
Touch screensIn a phone's or tablet's browser the game has the same touch controls as on iOS and Android. They stay inside the page's safe area; in an iframe, the embedding page posts its own ({type: 'neo:safe-area', left, right, top, bottom}).
Script consoleKeyboard only: it opens with a hardware keyboard, and there's no on-screen button or system keyboard for it.

The engine core's examples show which run in a browser: each example page in Examples marks the ones that don't.

Phones and tablets#

iOS and Android builds come from the same game crate as the desktop build:

Shell
cargo xtask package --target ios --game my_game        # a Simulator .app (and a .zip)
cargo xtask package --target android --game my_game    # an arm64 APK
cargo xtask mobile play --target android --boot        # install it on a headless emulator and run it
WhatiOSAndroid
Entry pointThe binary.The game crate's library, started through #[neo_main] in lib.rs. Projects from a template have it.
ContentThe bundle's assets/.The APK's assets/, stored uncompressed.
Saves, settings, logsThe app's sandbox.The app's files folder.
WindowFull screen, landscape, no status bar. The frame loop runs at up to 60 Hz.Full screen, landscape.

On phones and tablets, neo_input_kit adds touch controls: a floating move stick on the left half of the screen, camera drag on the right half, and Jump, Action, Crouch and Sprint buttons outside the safe area. They add to the keyboard and gamepad, so a controller paired with a phone works too, and they show while touch was the last input (LastInput). The web build has the same controls in a phone's or tablet's browser; see Web builds. See Touch.

You need the targets and tools:

Shell
rustup target add aarch64-apple-ios-sim aarch64-linux-android
cargo install cargo-ndk

Android also needs a JDK and the Android SDK, NDK and emulator.

Writing code that runs everywhere#

  • Never read files with std::fs. Load through the asset server, or through neo_device::files for files a loader opens itself. That's what lets the same code run in a browser.
  • Don't call std::process or std::env from game code. Read launch options through the platform layer, such as neo_device::launch_param.
  • Use cfg sparingly. #[cfg(target_arch = "wasm32")] is for platform-specific setup, such as the browser's canvas; gameplay shouldn't need it.
  • Test the web build early. Single-threaded performance and WebGL 2's limits are the most common surprises.

Next steps#