Skip to content

Commit

Permalink
Turn off X11
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Jan 4, 2025
1 parent 4e344aa commit cac7ecc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ This is a script to bundle/package dawn.node and hopefully publish it on npm
[Dawn](https://dawn.googlesource.com/dawn) is an implementation of [WebGPU](https://gpuweb.github.io/gpuweb/).
It includes a node plugin and this repo builds that plugin.

# Usage

TDB

Note: This package provides a WebGPU implementation it node. That said, if you are making a webpage
and are considering using this for testing, you'd probably be better off using puppeteer. You can
find an example of using puppeteer for testing WebGPU in [this repo](https://github.com/greggman/webgpu-debug-helper).

This package is for WebGPU in node. It provides WebGPU in node. But it doesn't not provide integration
with the web platform. For example, importing video via `HTMLVideoElement` or `VideoFrame`. It doesn't
provide a way to copy an `HTMLImageElement` to a texture. It also doesn't provide a way to render to an
`HTMLCanvasElement`. All of those only exist in the browser, not in node.

I suspect you could provide many of those with polyfills without changing this repo but I have not
looked into it.

What you can do is render to textures and then read them back. You can also run compute shaders
and read their results.

# Updating

This updates to the latest dawn and depot_tools
Expand Down
1 change: 1 addition & 0 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ async function buildDawnNode() {
dawnPath,
...addElemIf(!isWin, '-GNinja'),
'-DDAWN_BUILD_NODE_BINDINGS=1',
'-DDAWN_USE_X11=OFF',
...addElemIf(isMac, '-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk'),
]);
if (isWin) {
Expand Down

0 comments on commit cac7ecc

Please sign in to comment.