https://github.com/virgesmith/julia
node.js-free rust+wasm fractals
https://github.com/virgesmith/julia
Last synced: 11 months ago
JSON representation
node.js-free rust+wasm fractals
- Host: GitHub
- URL: https://github.com/virgesmith/julia
- Owner: virgesmith
- License: mit
- Created: 2022-07-24T18:57:40.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-26T10:17:01.000Z (over 1 year ago)
- Last Synced: 2025-04-08T16:55:16.857Z (about 1 year ago)
- Language: Rust
- Size: 967 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# julia
 
[Animated Julia sets](https://friarswood.net) and a [zoomable Mandelbrot set](https://friarswood.net/mandel.html), implemented in rust and webassembly.
This version is a barebones reworking of a previous implementation that was beset by node.js vulnerabilities.
Based on the tutorial [here](https://wasmbyexample.dev). Doesn't require node.js or webpack.
## prepare
First, install
- [rust](https://www.rust-lang.org/tools/install)
- [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)
## build
```sh
wasm-pack build --target web --no-typescript
```
## run locally
Use a proper web server for prod. For local dev:
```sh
python3 -m http.server
```
## test (on firefox)
```sh
firefox --private-window localhost:8000
```
`F12` opens debug console
## package/deploy
Uses the nginx docker image:
```sh
docker build -t julia .
docker run -it -d -p 80:80 julia:latest
```
## TODO
- [X] parallelise e.g. https://rustwasm.github.io/docs/wasm-bindgen/examples/raytrace.html