Most developers do not need to do this. When the prebuilt compiler binaries are available, that is the recommended path. Build from source if you need to track an unreleased branch, target an unsupported platform, or hack on the compiler itself.

These instructions cover Ubuntu / Debian-style Linux. The build is clean on Ubuntu 22.04 and 24.04; other distributions need equivalent packages.

I. Install ADAPT

  1. Install git and clone the ADAPT toolkit repository.
    sudo apt install git
    git clone https://github.com/adapt-toolkit/adapt.git
    
  2. Enter the repository.
    cd adapt
    

II. Build the toolchain

Pick one of the two paths below — Docker if you prefer a hermetic build, native if you want fast iteration.

Docker build

  1. Install Docker if you do not already have it.
    sudo ./setup.sh --install-docker
    
  2. Build the dependencies image locally. This is a one-time step that bakes in the compiler toolchain (gcc, clang, rust, emsdk) and runs setup.sh to initialise the git submodules and compile the C/C++ external libraries (libsodium, wolfssl, utf8proc, libgmp, nitroattest) into a SHA-keyed cache inside the image. Subsequent per-build containers restore those artefacts from the cache instead of recompiling them.
    docker build . -f docker/build-dependencies/Dockerfile -t adaptframework/build-dependencies:latest
    
  3. Run the build(s) you need.
    docker-compose up build-gpp-native
    docker-compose up build-clang-native
    docker-compose up build-emcc-wasm
    docker-compose up build-gpp-native-debug
    docker-compose up build-clang-native-debug
    docker-compose up build-emcc-wasm-debug
    

Native build

  1. Install the build dependencies.
    sudo ./setup.sh --install-compiler
    ./setup.sh --install-rust
    ./setup.sh --install-emsdk
    
  2. Optionally install Google Chrome (for in-browser WASM tests).
    sudo ./setup.sh --install-chrome
    
  3. Activate the Rust and Emscripten environments.
    source ~/.cargo/env
    source ../emsdk/emsdk_env.sh
    
  4. Configure the repository and build dependencies.
    ./setup.sh
    
  5. Run the build(s) you need.
    ./scripts/build-gpp-native.sh
    ./scripts/build-gpp-native-debug.sh
    ./scripts/build-clang-native.sh
    ./scripts/build-clang-native-debug.sh
    ./scripts/build-emcc-wasm.sh
    ./scripts/build-emcc-wasm-debug.sh
    
  6. Run the tests relevant to your build.
    ./scripts/test-gpp-native.sh
    ./scripts/test-gpp-native-debug.sh
    ./scripts/test-clang-native.sh
    ./scripts/test-clang-native-debug.sh
    ./scripts/test-emcc-wasm.sh
    ./scripts/test-emcc-wasm-debug.sh
    

After a successful build, mufl and mufl-compile are available in build.linux.release/bindings/ (or the analogous directory for the build variant you ran). Add it to your PATH to mirror the prebuilt binary install.

III. Optional: install the language server

To enable in-editor diagnostics for MUFL, see Install the language server.