Skip to content
simple Mandelbrot set fractal visualiser
Rust
Branch: master
Clone or download
This branch is 59 commits ahead, 1 commit behind tworec:master.

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.cargo
src
.gitignore
Cargo.lock
Cargo.toml
LICENSE
README.md
mandelbrot_demo.gif
rust-toolchain

README.md

mandelbrot

mandelbrot is a simple Mandelbrot set fractal visualiser for use with our gWasm platform.

mandelbrot GIF demo

Building

Before building the program, you'll need to download and install the Emscripten SDK. Follow the instructions on Emscripten SDK website to get the latest copy of the SDK.

Next, install the wasm32-unknown-emscripten target. Assuming you're using rustup to manage your Rust installation, run the below command:

rustup target add wasm32-unknown-emscripten

With the WASM target installed you're ready to build the crate:

cargo build --release

Running

You'll need a copy of our gwasm-runner binary in order to run the program.

Running locally

gwasm-runner target/wasm32-unknown-emscripten/release/mandelbrot.wasm -- 1000 1000 2

Running on Golem Unlimited

gwasm-runner --backend=GU target/wasm32-unknown-emscripten/release/mandelbrot.wasm -- 1000 1000 2

Running on Golem network

gwasm-runner --backend=Brass target/wasm32-unknown-emscripten/release/mandelbrot.wasm -- 1000 1000 2

When running on the Golem network, you may want to adjust some parameters specific to Brass Golem (e.g. the path to your Golem's data directory). To do so, you'll need to create a configuration file for the runner. You can find more information on this in the gwasm-runner README.

You can’t perform that action at this time.