We provided a prebuilt release deliver by Github Action. It will automaticly update about 00:00.
You can simply use it without python and git setup.
-
Download latest release from here.
-
Place it into your project
-
Setup the include path and linker. If you'r using CMake, we provided a configuration for you. Just the following code into your
CMakeLists.txt
.
find_package(WebGPU PATHS PATH/TO/WebGPU-Cpp/CMake NO_DEFAULT_PATH REQUIRED)
target_link_libraries(YourTarget PUBLIC WebGPU)
Python 3.7 and above
- Clone this project
git clone https://github.com/DarcJC/WebGPU-Cpp-Integration.git
- Initializing the dependencies of this project.
# Liunx or Unix
chmod +x Setup.sh && ./Setup.sh
# Windows
./Setup.bat
- Collect your dependencies
# Linux or Unix
python3 generate_required_dependencies.py --output WebGPU
# Windows
python generate_required_dependencies.py --output WebGPU
# With webgpu.hpp
python generate_required_dependencies.py --output WebGPU --generate_cpp 1
- Add to your project
If you'r using a building tool other than CMake, you should configure the header path and the linker on your own.
find_package(WebGPU PATHS PATH/TO/CMake/DIRECTORY NO_DEFAULT_PATH REQUIRED)
target_link_libraries(YourTarget PUBLIC WebGPU)
- You can modify
defaults_extra.txt
to override defaults value using by WebGPU-Cpp. - Use
python generate_required_dependencies.py -h
to see more information. - If you encounter network issues, try to export an environment variable
ALL_PROXY=http://your-proxy:7890
to using a proxy.