Not long after the port of CloudABI to the Linux kernel became stable, community members Mara Bos and Maarten de Vries did all the necessary work to package CloudABI for Arch Linux, making it the first Linux distribution to have easily installable support for CloudABI. Nuxi would like to thank Mara and Maarten for their contributions!
This document explains how to install all the necessary software on Arch Linux to both develop and run CloudABI programs.
A complete toolchain for CloudABI based on LLVM's Clang and GNU Binutils can be obtained by installing the cloudabi-toolchain package from the Arch Linux User Repository (AUR). This package installs a copy of the toolchain for every architecture supported by CloudABI, thus making it very easy to cross compile software for other hardware:
The toolchain provided by Arch Linux does not ship with any code that has been cross compiled for CloudABI, meaning it cannot be used to build CloudABI applications on its own. Cross compiled libraries and tools are instead provided by the CloudABI Ports Collection. Software that is part of the CloudABI Ports Collection is automatically packaged for a variety of systems, including Arch Linux's pacman.
The CloudABI Ports Collection can be accessed by adding both a repository snippet and a public signing key to pacman's configuration. This can be accomplished by running the following commands:
It typically makes sense to at least install the standard C++ runtime environment package, so that it is possible to compile C and C++ applications that depend on just core C, C++ and POSIX interfaces:
A full list of packages provided by the CloudABI Ports Collection can be obtained by running the following command:
Our eventual goal is to provide support for CloudABI in the form of a kernel module that can be used in combination with a stock Linux kernel. Unfortunately we still depend on a fair number of local changes to the kernel that need to be upstreamed first, meaning that support for CloudABI is currently only available in the form of a modified Linux kernel with integrated CloudABI support.
Though manually compiling a kernel is normally a tedious job, the AUR also provides a package to easily build and install it from source:
Keep in mind that building the kernel requires a significant amount of disk space. If the system's /tmp is small, it may be necessary to provide an alternative build directory to yaourt using the --tmp command line flag. As your system is now using a custom kernel, packages that provide external kernel modules should be replaced by their DKMS versions. After installing the kernel and rebooting, CloudABI executables can be executed directly:
The AUR also provides the cloudabi-utils package that contains the cloudabi-run utility. This tool can be used to spawn CloudABI applications safely, ensuring that no resources are accidentally leaked into the process. The shell commands below show how cloudabi-run can be used to execute the CloudABI test suite. Please refer to cloudabi-run's manual page for more examples.