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).
Environment Setup
Section titled “Environment Setup”Prerequisites
Section titled “Prerequisites”- 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)
Install vcpkg
Section titled “Install vcpkg”We use vcpkg in manifest mode to manage most dependencies.
- 
Clone vcpkg: Terminal window git clone https://github.com/microsoft/vcpkg.git./vcpkg/bootstrap-vcpkg.sh # or .\bootstrap-vcpkg.bat on Windows
- 
If needed, set the environment variable VCPKG_ROOTto point to your vcpkg directory.
Setup for Web (Emscripten/WebGPU)
Section titled “Setup for Web (Emscripten/WebGPU)”- 
Install the Emscripten SDK: Terminal window git clone https://github.com/emscripten-core/emsdk.gitcd emsdk./emsdk install latest./emsdk activate latestsource ./emsdk_env.sh # or emsdk_env.bat on Windows
- 
Ensure emccis in yourPATHbefore running CMake.
- 
Confirm that -pthread,-matomics, and-mbulk-memoryflags are supported — see build notes below if WebGPU issues arise.
Setup for Windows (Visual Studio 2022)
Section titled “Setup for Windows (Visual Studio 2022)”- 
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”
 
Setup for Linux
Section titled “Setup for Linux”- 
Install required packages: Terminal window sudo apt updatesudo 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 ”- 
Install Android Studio. 
- 
Inside the SDK Manager, install: - Android NDK (r23 or newer)
- CMake and LLDB
- SDK tools for API level 24+ (Vulkan support)
 
- 
Set the environment variable ANDROID_NDK_HOMEto point to your NDK installation.
Build Instructions
Section titled “Build Instructions”- 
Clone the repository and initialize submodules. git clone --recurse-submodules https://github.com/WilliamKarolDiCioccio/mosaic.
- 
Select a CMake configure preset, then a build preset (the vcpkg toolchain manages installation automatically). 
- 
Build the project — and you’re good to go! 
This ensures compatibility with multi-threaded WebAssembly targets.
License
Section titled “License”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.
| Permissive | Commercial Use | Attribution Required | Copyleft (Same License) | Can Use in Closed Source | 
|---|---|---|---|---|
| ❌ | ✅ | ✅ | ✅ | ❌ |