The web
Run the same app in the browser from WebAssembly and WebGPU.
Yoga's browser host (app_js.go) runs the same Body from WebAssembly and draws with the browser's WebGPU. It needs no Cgo.
Web requires a browser with WebGPU (navigator.gpu). Desktop packaging needs CGO (GLFW / wgpu-native) and generally must run on the target OS.
go run ./cmd/yoga package -os web ./example/todo
go run ./cmd/yoga serve -addr 127.0.0.1:8080 # serves ./dist/web
go run ./cmd/yoga serve ./path/to/web-output # or any packaged dir
# open http://127.0.0.1:8080/
Edit this page on GitHub