v/examples/wasm/mandelbrot
2023-12-11 14:10:06 +02:00
..
main.v examples: serve the wasm mandelbrot project using a v web server (#19937) 2023-12-11 14:10:06 +02:00
mandelbrot.html examples: serve the wasm mandelbrot project using a v web server (#19937) 2023-12-11 14:10:06 +02:00
mandelbrot.wasm.v examples: serve the wasm mandelbrot project using a v web server (#19937) 2023-12-11 14:10:06 +02:00
README.md examples: serve the wasm mandelbrot project using a v web server (#19937) 2023-12-11 14:10:06 +02:00

Run V Mandelbrot Example

Using only V

v run main.v

Using Python or Emscripten

  1. First, create mandelbrot.wasm. Compile with -os browser.
v -b wasm -os browser mandelbrot.wasm.v
  1. 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