@wasi-gfx/js-webgpu 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/index.js +1665 -0
- package/package.json +35 -0
- package/types/interfaces/wasi-cli-run.d.ts +5 -0
- package/types/interfaces/wasi-cli-stdout.d.ts +3 -0
- package/types/interfaces/wasi-frame-buffer-frame-buffer.d.ts +21 -0
- package/types/interfaces/wasi-graphics-context-graphics-context.d.ts +17 -0
- package/types/interfaces/wasi-io-error.d.ts +18 -0
- package/types/interfaces/wasi-io-poll.d.ts +43 -0
- package/types/interfaces/wasi-io-streams.d.ts +240 -0
- package/types/interfaces/wasi-surface-surface.d.ts +400 -0
- package/types/interfaces/wasi-webgpu-webgpu.d.ts +1636 -0
- package/types/wit.d.ts +10 -0
- package/wit/deps/cli/command.wit +7 -0
- package/wit/deps/cli/environment.wit +18 -0
- package/wit/deps/cli/exit.wit +4 -0
- package/wit/deps/cli/imports.wit +20 -0
- package/wit/deps/cli/run.wit +4 -0
- package/wit/deps/cli/stdio.wit +17 -0
- package/wit/deps/cli/terminal.wit +49 -0
- package/wit/deps/clocks/monotonic-clock.wit +45 -0
- package/wit/deps/clocks/wall-clock.wit +42 -0
- package/wit/deps/clocks/world.wit +6 -0
- package/wit/deps/filesystem/preopens.wit +8 -0
- package/wit/deps/filesystem/types.wit +634 -0
- package/wit/deps/filesystem/world.wit +6 -0
- package/wit/deps/frame-buffer/frame-buffer.wit +23 -0
- package/wit/deps/graphics-context/graphics-context.wit +18 -0
- package/wit/deps/io/error.wit +34 -0
- package/wit/deps/io/poll.wit +41 -0
- package/wit/deps/io/streams.wit +262 -0
- package/wit/deps/io/world.wit +6 -0
- package/wit/deps/random/insecure-seed.wit +25 -0
- package/wit/deps/random/insecure.wit +22 -0
- package/wit/deps/random/random.wit +26 -0
- package/wit/deps/random/world.wit +7 -0
- package/wit/deps/sockets/instance-network.wit +9 -0
- package/wit/deps/sockets/ip-name-lookup.wit +51 -0
- package/wit/deps/sockets/network.wit +145 -0
- package/wit/deps/sockets/tcp-create-socket.wit +27 -0
- package/wit/deps/sockets/tcp.wit +353 -0
- package/wit/deps/sockets/udp-create-socket.wit +27 -0
- package/wit/deps/sockets/udp.wit +266 -0
- package/wit/deps/sockets/world.wit +11 -0
- package/wit/deps/surface/surface.wit +248 -0
- package/wit/deps/webgpu/imports.wit +5 -0
- package/wit/deps/webgpu/webgpu.wit +1085 -0
- package/wit/deps.lock +51 -0
- package/wit/deps.toml +18 -0
- package/wit/world.wit +10 -0
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# wasi-gfx-js implements the official WebGPU JavaScript API on top of WASI
|
|
2
|
+
|
|
3
|
+
## Compile the TypeScript
|
|
4
|
+
```shell
|
|
5
|
+
npm run build
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
## Examples
|
|
9
|
+
|
|
10
|
+
### Available examples:
|
|
11
|
+
- hello-compute
|
|
12
|
+
- hello-triangle
|
|
13
|
+
|
|
14
|
+
### Compile an example:
|
|
15
|
+
```shell
|
|
16
|
+
npm run example --example=[example]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Run an example:
|
|
20
|
+
Use [github.com/wasi-gfx/graphtime](https://github.com/wasi-gfx/graphtime) to run ./out/[example].wasm
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Generate types from wit
|
|
24
|
+
```shell
|
|
25
|
+
jco types wit --out-dir=types
|
|
26
|
+
```
|