mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
20 lines
397 B
Markdown
20 lines
397 B
Markdown
# Run V Mandelbrot Example
|
|
|
|
## Using only V
|
|
|
|
```
|
|
v run .
|
|
```
|
|
|
|
## Using Python or Emscripten
|
|
|
|
1. First, create `mandelbrot.wasm`. Compile with `-os browser`.
|
|
|
|
```
|
|
v -b wasm -os browser mandelbrot.wasm.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`
|