This repository serves as a simple test environment demonstrating how to set up a build system for WebGPU projects using Meson and Conda. The provided setup includes all necessary configuration files and scripts to get you started with building WebGPU applications efficiently.
- WebGPU Integration: Demonstrates the basic setup required to develop WebGPU applications.
- Meson Build System: Utilizes the Meson build system for its simplicity and speed, ensuring a seamless build process.
- Conda Environment: Leverages Conda for managing dependencies and creating a consistent development environment.
Ensure you have the following installed on your system:
You may use pip install -r requirements.txt
. It will install the versions used while development. Other versions may work as well.
-
Clone the repository:
-
Install the Prerequisites
pip install -r requirements.txt
-
Run setup.py:
python setup.py
Important
The Conan profile will be automatically detected during setup.py
. However, it will most likely neet to be reconfigured as for now, on Windows, not all compilers work. See Chapter Known Issues.
You can use conan profile detect --name webgpu_engine
to manually create the profile and conan profile path webgpu_engine
to find the file's location in order to edit it (The path will be written during the setup.py
). The used Conan configuration is:
[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.version=193
os=Windows
The setup for the project is optimized for windows and VSC. It does not yet work for other platforms.
The project does not yet support emscripten.
- Support for debug and release configurations via parameters.
- Support for emscripten via parameters.
- Web Example
- setting up conan profiles in relative path
- Supporting easy debug functionality
Challenges arose when attempting to compile using MinGW due to issues with libraries like libiconv
Conan Center Index Issue #506.
Compiling on Windows using GCC, particularly with Mingw, presents challenges due to compatibility issues and specific compiler quirks. Issues such as Conan Issue #2760 highlight difficulties in ensuring correct library linking and toolchain configuration, which are crucial for successful compilation.
Compiling with Clang encountered errors related to SDL2, specifically concerning invalid use of undefined types LLVM Project Issue #44502.