@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.
Files changed (50) hide show
  1. package/README.md +26 -0
  2. package/dist/index.js +1665 -0
  3. package/package.json +35 -0
  4. package/types/interfaces/wasi-cli-run.d.ts +5 -0
  5. package/types/interfaces/wasi-cli-stdout.d.ts +3 -0
  6. package/types/interfaces/wasi-frame-buffer-frame-buffer.d.ts +21 -0
  7. package/types/interfaces/wasi-graphics-context-graphics-context.d.ts +17 -0
  8. package/types/interfaces/wasi-io-error.d.ts +18 -0
  9. package/types/interfaces/wasi-io-poll.d.ts +43 -0
  10. package/types/interfaces/wasi-io-streams.d.ts +240 -0
  11. package/types/interfaces/wasi-surface-surface.d.ts +400 -0
  12. package/types/interfaces/wasi-webgpu-webgpu.d.ts +1636 -0
  13. package/types/wit.d.ts +10 -0
  14. package/wit/deps/cli/command.wit +7 -0
  15. package/wit/deps/cli/environment.wit +18 -0
  16. package/wit/deps/cli/exit.wit +4 -0
  17. package/wit/deps/cli/imports.wit +20 -0
  18. package/wit/deps/cli/run.wit +4 -0
  19. package/wit/deps/cli/stdio.wit +17 -0
  20. package/wit/deps/cli/terminal.wit +49 -0
  21. package/wit/deps/clocks/monotonic-clock.wit +45 -0
  22. package/wit/deps/clocks/wall-clock.wit +42 -0
  23. package/wit/deps/clocks/world.wit +6 -0
  24. package/wit/deps/filesystem/preopens.wit +8 -0
  25. package/wit/deps/filesystem/types.wit +634 -0
  26. package/wit/deps/filesystem/world.wit +6 -0
  27. package/wit/deps/frame-buffer/frame-buffer.wit +23 -0
  28. package/wit/deps/graphics-context/graphics-context.wit +18 -0
  29. package/wit/deps/io/error.wit +34 -0
  30. package/wit/deps/io/poll.wit +41 -0
  31. package/wit/deps/io/streams.wit +262 -0
  32. package/wit/deps/io/world.wit +6 -0
  33. package/wit/deps/random/insecure-seed.wit +25 -0
  34. package/wit/deps/random/insecure.wit +22 -0
  35. package/wit/deps/random/random.wit +26 -0
  36. package/wit/deps/random/world.wit +7 -0
  37. package/wit/deps/sockets/instance-network.wit +9 -0
  38. package/wit/deps/sockets/ip-name-lookup.wit +51 -0
  39. package/wit/deps/sockets/network.wit +145 -0
  40. package/wit/deps/sockets/tcp-create-socket.wit +27 -0
  41. package/wit/deps/sockets/tcp.wit +353 -0
  42. package/wit/deps/sockets/udp-create-socket.wit +27 -0
  43. package/wit/deps/sockets/udp.wit +266 -0
  44. package/wit/deps/sockets/world.wit +11 -0
  45. package/wit/deps/surface/surface.wit +248 -0
  46. package/wit/deps/webgpu/imports.wit +5 -0
  47. package/wit/deps/webgpu/webgpu.wit +1085 -0
  48. package/wit/deps.lock +51 -0
  49. package/wit/deps.toml +18 -0
  50. 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
+ ```