1
0
Fork
You've already forked gruid-js
0
A gruid Driver using syscall/js and wasm and HTML5 canvas.
  • Go 88.2%
  • HTML 11.8%
Find a file
Yon 38fc6dab26 cleanups and minor fix
No custom handling of fullscreen on F11 (we don't use the screenful
script anymore). We now ensure that preventDefault is only called for
things we actually use in gruid (so that F11 still works, but with the
browser's default behavior).
AppDivID option is no more, as it's no longer used.
Also, fix "Backspace" key (was spelled wrongly).
Some code simplifications, too, and update to latest gruid.
2026年01月08日 08:45:58 +00:00
files Put the gruid js Driver in its own module. 2021年02月19日 08:59:10 +00:00
.gitignore Put the gruid js Driver in its own module. 2021年02月19日 08:59:10 +00:00
go.mod cleanups and minor fix 2026年01月08日 08:45:58 +00:00
go.sum cleanups and minor fix 2026年01月08日 08:45:58 +00:00
js.go cleanups and minor fix 2026年01月08日 08:45:58 +00:00
LICENSE add LICENSE 2021年02月19日 13:17:42 +00:00
README.md update dependencies and README for release 2025年07月22日 14:34:56 +00:00

gruid-js

pkg.go.dev godocs.io

The gruid-js module provides a gruid Driver for making wasm gruid applications that run in the browser. The module's package is called js.

To build a browser application, you have to build it with the following variables:

GOOS=js GOARCH=wasm go build -o app.wasm /path/to/your/application

Then, you have to serve using an http server a directory containing the app.wasm file along with an index.html file such as the basic example one in files/index.html (the html page containing the canvas of your application). You also need to copy the wasm_exec.js support file corresponding to your Go version, as explained in Go Wiki: WebAssembly.