Vai al contenuto

Getting Started

Setting up the environment for contributing to Mosaic.

Questo contenuto non è ancora disponibile nella tua lingua.

Mosaic uses CMake as its build system. Most dependencies are managed via vcpkg, while those unavailable through vcpkg — such as WebGPU, utility libraries, or components requiring special build profiles — are included as submodules under the vendor/ directory.

On Windows, we recommend using Visual Studio 2022 over VS Code for better CMake integration. The default compiler on Windows is MSVC, but Clang is also supported — and is the preferred compiler on Linux and Web targets (via Emscripten).

  • CMake 3.25 or later
  • Git — with submodule support
  • Python 3 — required for Emscripten and some build scripts
  • A C++23-compliant compiler (MSVC ≥ 17.13 Preview 2, Clang ≥ 13, or GCC ≥ 14)

We use vcpkg in manifest mode to manage most dependencies.

  1. Clone vcpkg:

    Terminal window
    git clone https://github.com/microsoft/vcpkg.git
    ./vcpkg/bootstrap-vcpkg.sh # or .\bootstrap-vcpkg.bat on Windows
  2. If needed, set the environment variable VCPKG_ROOT to point to your vcpkg directory.

  1. Install the Emscripten SDK:

    Terminal window
    git clone https://github.com/emscripten-core/emsdk.git
    cd emsdk
    ./emsdk install latest
    ./emsdk activate latest
    source ./emsdk_env.sh # or emsdk_env.bat on Windows
  2. Ensure emcc is in your PATH before running CMake.

  3. Confirm that -pthread, -matomics, and -mbulk-memory flags are supported — see build notes below if WebGPU issues arise.

  • Install Visual Studio 2022 with the following components:

    • “Desktop development with C++”
    • “C++ CMake tools for Windows”
    • “MSVC v143” or later
    • “Windows 10 or 11 SDK”
  • Install required packages:

    Terminal window
    sudo apt update
    sudo apt install build-essential cmake git ninja-build python3 python3-pip libx11-dev libxcursor-dev libxrandr-dev libxi-dev libgl1-mesa-dev libvulkan-dev

Setup for Android Experimental

Section titled “Setup for Android ”
  1. Install Android Studio.

  2. Inside the SDK Manager, install:

    • Android NDK (r23 or newer)
    • CMake and LLDB
    • SDK tools for API level 24+ (Vulkan support)
  3. Set the environment variable ANDROID_NDK_HOME to point to your NDK installation.

  1. Clone the repository and initialize submodules. git clone --recurse-submodules https://github.com/WilliamKarolDiCioccio/mosaic.

  2. Select a CMake configure preset, then a build preset (the vcpkg toolchain manages installation automatically).

  3. Build the project — and you’re good to go!

This ensures compatibility with multi-threaded WebAssembly targets.


Mosaic is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0), a strong copyleft license that requires derivative works and networked software to remain open source under the same license. See the LICENSE.md file for full details.

PermissiveCommercial UseAttribution RequiredCopyleft (Same License)Can Use in Closed Source