webgpu v0.1.16
Platforms
This project comes with pre-built N-API binaries for the following platforms:
| OS | Status |
|---|---|
| Windows | ✔ |
| Linux | ✔ |
| MacOS | ✔ |
Installation
npm install webgpuBuilding
You have to build dawn as a shared library.
After building dawn, create a file named PATH_TO_DAWN in this project's root directory, containing the absolute path to dawn.
In case you have multiple python installations, you might want to use the --script-executable gn flag to instruct gn to use the python 2.x installation.
After you have generated and built dawn, you can now build this project by running:
npm run all --dawnversion=0.0.1Windows
Follow dawn's initial setup instructions, but instead of the standard build, do the following:
To generate the project as a shared library using MSVS:
gn gen out/Shared --ide=vs --target_cpu="x64" --args="is_component_build=true is_debug=false is_clang=false"It's important that you build using MSVS and not clang, as otherwise you will potentially get linking errors.
To build the project run:
ninja -C out/SharedIn case python wasn't found:
- Use
where pythonto get the location of your python installation - Repoint it by running e.g.
npm config set python C:\depot_tools\python.bat
Linux
Follow dawn's initial setup instructions, but instead of the standard build, do the following:
To generate the project as a shared library:
gn gen out/Shared --target_cpu="x64" --args="is_component_build=true is_debug=false is_clang=true"To build the project run:
ninja -C out/SharedMacOS
Follow dawn's initial setup instructions, but instead of the standard build, do the following:
To generate the project as a shared library:
gn gen out/Shared --target_cpu="x64" --args="is_component_build=true is_debug=false is_clang=true"To build the project run:
ninja -C out/SharedExamples
cd examples & cd ..
node --experimental-modules examples/interactive-triangle.mjsTODOs
- Add CTS
- Remove libshaderc from build?
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago