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:
- Linux
- MacOS
- Windows
docker run --platform linux/amd64 --rm -v .:/src -it ghcr.io/oasisprotocol/rofl-dev:main oasis rofl build
docker run --platform linux/amd64 --rm -v .:/src -it ghcr.io/oasisprotocol/rofl-dev:main oasis rofl build
docker run --platform linux/amd64 --rm -v .:/src -it ghcr.io/oasisprotocol/rofl-dev:main oasis rofl build
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.
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:
- Linux
- MacOS
- Windows
docker run --platform linux/amd64 --rm -v .:/src -v ~/.config/oasis:/root/.config/oasis -it ghcr.io/oasisprotocol/rofl-dev:main oasis
docker run --platform linux/amd64 --rm -v .:/src -v "~/Library/Application Support/oasis/":/root/.config/oasis -it ghcr.io/oasisprotocol/rofl-dev:main oasis
docker run --platform linux/amd64 --rm -v .:/src -v %USERPROFILE%/AppData/Local/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:
- Linux
- MacOS
alias oasis='docker run --platform linux/amd64 --rm -v .:/src -v ~/.config/oasis:/root/.config/oasis -it ghcr.io/oasisprotocol/rofl-dev:main oasis'
alias oasis='docker run --platform linux/amd64 --rm -v .:/src -v "~/Library/Application Support/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.