Rust Mandelbrot Set Explorer
Rust Mandelbrot Set Explorer is a web app that lets you explore the Mandelbrot set fractal. Built with Rust, compiled to WebAssembly, running on Web Workers.
Code directory
- Mandelbrot set code -
mandelbrot/src/lib.rs
- Rust tests -
mandelbrot/src/lib_test.rs
- Web Worker -
client/app/worker.js
- Leaflet tile generation -
client/app/main.ts
Features
- Set max iterations to adjust speed vs render quality
- "Multibrot" sets can be rendered by increasing the exponent parameter
- Tune rendering performance by setting the number of worker threads
- Adjust the size of map tiles
- Enter fullscreen mode
- Save the visible portion of the fractal as an image
Local development
- Build scripts are available in
client/package.json
. You can use the following commands from withinclient/
:npm install
-- Install npm dependenciesnpm run start
-- Serve the project locally for development athttp://localhost:9090
npm run build
-- Build the project for productionnpm run test
-- Run Rust testsnpm run lint
-- Find problems with code
If you get weird errors, try running ./clean.sh
to purge all dependency caches.
The project is based on this Rust WASM worker template.