Most developers do not need to do this. Install the MUFL toolchain from npm instead — see Install the MUFL toolchain.
These instructions cover recent macOS (verified on macOS 12 Monterey). Apple Silicon and Intel are both supported.
I. Install ADAPT
- Install
gitand clone the ADAPT toolkit repository.brew install git git clone https://github.com/adapt-toolkit/adapt.git - Enter the repository.
cd adapt
II. Build the toolchain
Pick one of the two paths below.
Docker build
-
Install Docker Desktop if you do not already have it (instructions).
- Build the dependencies image locally. This is a one-time step that
bakes in the compiler toolchain (gcc, clang, rust, emsdk) and runs
setup.shto 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 - 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
-
Install Xcode.
- Install the MUFL compiler dependencies.
./setup.sh --install-compiler -
Restart your shell.
- Install the remaining dependencies.
./setup.sh --install-rust ./setup.sh --install-emsdk - Activate the Rust and Emscripten environments.
source ~/.cargo/env source ../emsdk/emsdk_env.sh - Configure the repository and build dependencies.
./setup.sh - 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 - 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.macos.release/bindings/. 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.