Skip to main content

Prerequisites

The following tools are used for ROFL development and deployment:

  • Oasis CLI: The oasis command will be used to manage your wallet and your ROFL app, including registering, building, deploying and managing your ROFL instances.
  • Docker: Docker is perfect for building your ROFLs without installing a handful of Intel-specific libraries and dependencies on your system. Also, Docker compose is ideal for testing your ROFLs locally before deploying them on-chain.

Pick among the three setups below.

Preferred Setup: Native Oasis CLI + Docker for building and testing

Download the native build of Oasis CLI for your OS and install it locally.

For building your ROFLs, the Oasis team prepared the ghcr.io/oasisprotocol/rofl-dev Docker image. It contains all the tools needed to compile any flavor of your ROFL app. You can test it out by running:

docker run --platform linux/amd64 --rm -v .:/src -it ghcr.io/oasisprotocol/rofl-dev:main oasis rofl build
--platform linux/amd64

Always provide the --platform linux/amd64 parameter to the rofl-dev image, no matter which processor your computer has or the operating system you're running.

Conservative Setup: Everything Docker

If you're having issues installing the Oasis CLI locally or you simply don't want to, you can run the oasis command from the rofl-dev Docker image.

Oasis CLI config

You will need to carefully bind-mount the Oasis CLI config folder for storing your accounts. Failing to do so will result in losing access to your (funded) accounts.

Invoking oasis from the rofl-dev image may look like this:

docker run --platform linux/amd64 --rm -v .:/src -v ~/.config/oasis:/root/.config/oasis -it ghcr.io/oasisprotocol/rofl-dev:main oasis

You can also define command alias, so a simple oasis command behaves as if it was installed locally. For example:

~/.bashrc
alias oasis='docker run --platform linux/amd64 --rm -v .:/src -v ~/.config/oasis:/root/.config/oasis -it ghcr.io/oasisprotocol/rofl-dev:main oasis'

Advanced Setup: Native Oasis CLI and ROFL build utils (linux/amd64 only)

Install the Oasis CLI locally.

Next, install tools for creating and encrypting partitions and QEMU. On a Debian-based Linux you can do so by running:

sudo apt install squashfs-tools cryptsetup-bin qemu-utils

Additionally, if you want to build SGX and TDX-raw ROFL bundles, you will need to follow the installation of the Rust toolchain and Fortanix libraries as described in the Oasis Core prerequisites chapter. For building ROFL natively, you do not need a working SGX/TDX TEE, just the Intel-based CPU and the corresponding libraries.