Put browser GPU compute and training into any website — no npm, no backend, no adapter code
<script> tag into your page and your visitors GPU computes right away:<script src="https://mox-site.pages.dev/webgpu/moxwebgpu.browser.js"></script>
<script>
MoxWebGPU.mox.init().then(gpu => {
gpu.tensor([1, 2, 3]).add(1).sum().then(r => console.log('result =', r));
});
</script>
window.MoxWebGPU — the simplest option:<script src="https://mox-site.pages.dev/webgpu/moxwebgpu.browser.js"></script>
<script>
const gpu = await MoxWebGPU.mox.init();
</script>
npm i @mox/moxwebgpu
import { mox } from '@mox/moxwebgpu';
const gpu = await mox.init();
import { mox } from 'https://esm.sh/@mox/moxwebgpu';
const gpu = await mox.init();
esbuild worker.ts --bundle \
--format=esm --outfile=dist/worker.js
Initializing WebGPU…