1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

wasm: add a webassembly compiler backend, based on using binaryen (#17368)

This commit is contained in:
l-m
2023-03-01 08:58:53 +11:00
committed by GitHub
parent b9a8a21094
commit 0625caad56
51 changed files with 7981 additions and 8 deletions

View File

@ -0,0 +1,12 @@
# V Mandelbrot Example
1. First, create `mandelbrot.wasm`. Compile with `-os browser`.
```
v -b wasm -os browser mandelbrot.v
```
2. Then, open the `mandelbrot.html` file in the browser.
- CORS errors do not allow `mandelbrot.wasm` to be loaded.
- Use `python -m http.server 8080`
- Use `emrun mandelbrot.html`