Building from Source
Introduction
Connection Machine compiles on MacOS, Windows, and Linux. There are a few things you have to do in order to get it up and running:
- Download the code
- Install the dependencies (Vulkan, wasmtime)
- Set up the CMake build system Things will generally run smoothly on MacOS and Linux, there are a few more steps on Windows.
Getting the source
You can start by git cloning the repository. A git client or the command line should work.
System dependencies
This project requires Vulkan SDK and Wasmtime to build.
- On MacOS, it is recommended to install
vulkan-tools
,vulkan-validationlayers
, andshaderc
using brew. - On Windows, install the Vulkan SDK via a package manager such as scoop (
scoop install vulkan
) so the PATH entries are handled automatically. - On Linux, Vulkan development packages should be available through your package manager.
Setting up the CMake build system
You need the CMake build system and a C++ compiler to build this project.
MacOS and Linux
You can get a compiler and CMake from your package manager. Any compiler should work.
Windows
Install the required toolchain before configuring CMake:
- Install Visual Studio Build Tools 2022 with the C++ build tools using the Visual Studio Installer.
- Install Rust (and Cargo) via rustup.
- Install the Vulkan SDK using a Windows package manager such as scoop (
scoop install vulkan
) so the paths are configured automatically.
After installing the tools, either launch CMake from the “Developer Command Prompt for VS…” (which already exposes the Visual Studio toolchain) or add the required executables such as cmake
to your PATH
. You can locate the Visual Studio CMake binaries by running where cmake
inside that developer prompt; for example, CMake might live at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin
.
PATH
issues before your first build.Using CMake
Even if you are going to have your IDE manage CMake, it’s a good idea to try running it from the terminal first.
- Configure -
cmake --preset debug
- Then Build -
cmake --build --preset debug
- Run the executable that was generated somewhere in the
build
directory. On Windows this is probably in theDebug
subdirectory.
You can also build for release with release
preset
Notes
If your error highlighting or IDE integration is showing red, make sure you have already compiled the project and the compile_commands.json
in the build folder is being recognized (default for most lsp)