Install

View source

Install Actus on Linux, macOS or Windows with one command, or download a release by hand.

Actus is installed as one folder that holds the compiler, the standard library and the tools. The installer puts that folder in your home directory and adds it to your PATH. It does not need administrator rights.

What you need

Releases are built for these systems:

There is no release for other combinations yet, such as Linux on arm64 or macOS on an Intel processor.

On Linux and macOS the installer needs curl, tar with xz support, and either sha256sum or shasum. On Windows it needs PowerShell.

To turn a program into an executable, which actus run and actus build --emit exe both do, Actus needs a few things from your system:

  • On Linux and macOS it runs cc, so a C compiler such as gcc or clang must be installed.
  • On Windows it links with its own LLD linker, which comes with Actus. The libraries of the MSVC toolset and the Windows SDK are not part of Actus, so you install them once. See Windows below.

You can check and format code without a linker.

Windows

Install Build Tools for Visual Studio and select the workload Desktop development with C++ in its installer. It brings the MSVC toolset and a Windows SDK. You do not need to open a special prompt. Actus finds the toolset and the SDK by itself, in a plain Command Prompt or PowerShell too.

If you start Actus from a Developer Command Prompt for Visual Studio instead, that prompt sets the LIB variable. When LIB is set and not empty, Actus uses it and does not look for anything else.

If the libraries cannot be found and LIB is not set, actus run and actus build stop before they link, with the error E1883. The message says what is missing, which places were searched, and what to install. It starts like this:

text
error[E1883]: cannot link for `x86_64-pc-windows-msvc`: LIB is not set and the MSVC toolset and the Windows SDK libraries were not found. Searched: ...

At the end it tells you to install "Build Tools for Visual Studio" with the "Desktop development with C++" workload, or to run actus from a Developer Command Prompt, which sets LIB.

Install with the script

Run the command for your system in a terminal. On Windows, use PowerShell. The system you pick is kept for the other commands on this page.

The script finds the latest release, downloads the archive for your system together with the release's SHA256SUMS file, and checks the archive against it. If the checksum does not match, nothing is installed. Then it unpacks the archive, runs the compiler once to make sure it works, and makes it the current version.

On Linux the end of the output looks like this. The four lines from actus 0.3.0 to backends are the real output of the Actus 0.3.0 compiler. The first and the last two lines show how the installer reports; the paths depend on your home directory.

text
Installing Actus 0.3.0 (x86_64-unknown-linux-gnu)
actus 0.3.0 (15b00577e24d)
llvm 23.1.2 verified llvm-23.1.2-actus-2 sha256:3dfe69ed3a2f1cb86e65c417ead3552d6dae6350b70947c3c35ff47cc0adfddc
host x86_64-unknown-linux-gnu
backends llvm, cranelift

Actus 0.3.0 is installed in /home/you/.actus/toolchains/actus-0.3.0-x86_64-unknown-linux-gnu
Open a new terminal, or run: . "/home/you/.actus/env"

Open a new terminal so that your PATH is updated, then check that it works.

Where things go

On Linux and macOS the installer adds the line . "$HOME/.actus/env" to your shell profile: ~/.zshrc for zsh, ~/.bashrc for bash on Linux, ~/.bash_profile for bash on macOS, a file in ~/.config/fish/conf.d for fish, and ~/.profile for other shells.

Options

The ACTUS_HOME environment variable sets the install folder in the same way as --prefix.

To install a specific version, for example 0.3.0, pass the option after sh -s --. On Windows, run the script as a script block so that you can give it parameters:

Check that it works

Open a new terminal and run:

bash
actus --version
text
actus 0.3.0 (15b00577e24d)
llvm 23.1.2 verified llvm-23.1.2-actus-2 sha256:3dfe69ed3a2f1cb86e65c417ead3552d6dae6350b70947c3c35ff47cc0adfddc
host x86_64-unknown-linux-gnu
backends llvm, cranelift

The first line is the Actus version. The host line shows your system, so it is different on macOS and Windows. If you see command not found, the folder ~/.actus/current/bin (on Windows, %LOCALAPPDATA%\Actus\current\bin) is not on your PATH yet. Open a new terminal. On Linux and macOS, you can also run:

bash
. ~/.actus/env

Now continue with your first program.

Install by hand

You can also download a release yourself. Releases are on GitHub (opens in a new tab). For version 0.3.0 the archives are:

Each release also has a SHA256SUMS file. It lists a checksum for every file of the release. The release holds a few more files than the three archives, such as debug symbols, which you do not need.

  1. Download the archive for your system and SHA256SUMS from the release page. The address of a file looks like this:

  2. Check the archive. Run the command for your system in the folder with both files, in PowerShell on Windows. On Linux, the command only looks at the files you have and checks them. On macOS and Windows, compare the result with the line for your archive in SHA256SUMS:

    On Linux the result looks like this:

    text
    actus-0.3.0-x86_64-unknown-linux-gnu.tar.xz: OK
  3. Unpack it. On Windows you can also unzip the file in Explorer:

  4. The archive unpacks to a folder named like the archive, with bin, lib and share inside. Keep these three folders together, because actus finds the standard library and the runtime relative to its own file. Add the bin folder to your PATH.

The archives are not signed. On macOS the system may block a program that you downloaded. If you trust the archive, you can remove the block with xattr -dr com.apple.quarantine <folder>.

Update

There is no actus update command. To get a newer version, run the install command again. Without --version it installs the latest release.

The new version is added next to the old ones, and current is switched to it only after its compiler has run. If the install fails, the old version keeps working. Older versions stay in the toolchains folder, so you can go back by installing the older version again with --version.

Uninstall

Delete the install folder, which is ~/.actus on Linux and macOS and %LOCALAPPDATA%\Actus on Windows. Then remove what the installer added to find it:

  • On Linux and macOS, delete the # Actus line and the . "$HOME/.actus/env" line below it from your shell profile.
  • On Windows, remove the current\bin entry from your user Path in the system settings for environment variables.

If you installed by hand, delete the unpacked folder and remove its bin folder from your PATH.