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 app, including registering, building, deploying and managing your ROFL replicas. - Docker (or Podman): Having build environment inside container to build your ROFL is perfect because you don't need to install a handful of Intel-specific libraries and dependencies on your system. Also, Compose is useful for testing your ROFL locally before deploying on-chain.
Pick among the three setups below.
Preferred: Native Oasis CLI + Container for building and testing
-
Download and install the Oasis CLI to your platform.
-
For building apps for ROFL, the Oasis team prepared the
ghcr.io/oasisprotocol/rofl-dev
image. It contains all the tools needed to compile any ROFL flavor of your 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/amd64Always provide the
--platform linux/amd64
parameter to therofl-dev
image, no matter which processor your computer has or the operating system you're running.
Conservative: Containers Everywhere
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
image.
You will need to carefully bind-mount the Oasis CLI config folder which contains your wallet. Failing to do so will result in losing access to your (funded) accounts.
-
Invoke
oasis
from therofl-dev
image:- 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
-
(optionally) Add
oasis
alias to your shell startup script to get the same behavior as if Oasis CLI was installed locally:- Linux
- MacOS
~/.bashrcalias oasis='docker run --platform linux/amd64 --rm -v .:/src -v ~/.config/oasis:/root/.config/oasis -it ghcr.io/oasisprotocol/rofl-dev:main oasis'
~/.bash_profilealias 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: Native Oasis CLI and ROFL build utils (linux/amd64
only)
-
Install the Oasis CLI locally.
-
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
-
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.