Skip to content
A simple clone of Minecraft written in Rust to run on Google Cardboard
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A simple clone of Minecraft written in Rust to run on Google Cardboard.

This was inspired by a nice Minecraft-like demo written in Pyglet:

I rewrote it in Java and OpenGL ES 2.0 in only to find that with a sufficiently complex and large landscape, generating additional chunks and loading them in the background thread would make frames stutter like there is no tomorrow (mostly because of garbage collection in ART).

This is an attempt to fix that by rewriting everything in Rust. The goal is 60 FPS while loading and unloading chunks in the background on MotoX 2014.

Building the project


  • Download and install Android SDK and Android NDK. Configure SDK, to support platform version 21 (Lollipop). Create a standalone NDK toolchain with --platform=android-21 and --toolchain=arm-linux-androideabi-4.9, see "Standalone Toolchain" in NDK documentation.

  • Install Rust cross-compiler for Android. You will need to build from source, and it will sadly take 1-2 hours:

  • Install cargo, a recent nightly build will do.

  • Check out the project and update submodules:

    $ git clone
    $ cd rusty-cardboard
    $ cd external/apk-builder
    $ git checkout master
    $ cd ../..


  • Build apk-builder:

    $ cd external/apk-builder/apk-builder
    $ cargo build --release --features "assets_hack"
  • Build the project:

    $ ANDROID_HOME=<sdk dir> NDK_HOME=<ndk dir> NDK_STANDALONE=<standalone ndk dir> PATH=$NDK_STANDALONE/bin:$PATH cargo build --target=arm-linux-androideabi
  • Install on your phone or emulator:

    $ mv target/arm-linux-androideabi/debug/RustyCardboard target/arm-linux-androideabi/debug/RustyCardboard.apk
    $ adb install -r target/arm-linux-androideabi/debug/RustyCardboard.apk
You can’t perform that action at this time.