{ rust => wasm => js }
galaxy generation simulation
previous verison, written in python
$ make install
$ make dev
- see makefile for others
./src/rust/
is the rust backend, with wasm-bindgen decorators. the first build stage runs rust tests viacargo test
./pkg/
is created via wasm-pack, which compiles the rust code towasm
+js
+typescript
./src/js/
imports./pkg/
and runs js tests vianpm test
./dist/
is created via webpack, which compiles everything mentioned above + angular- http://galaxygen.coilysiren.me is updated via heroku with the compiled code
Note: the compiled folders aren't present on the default branch. Go to { branch: deploy } to view them.
rust/*
contains the rust logic, wrapped in calls to wasm-bindgen to provide a js api
the files there are compiled to galaxy_gen_backend
as wasm
+ js
galaxy.rs
represents the proxy of a real life Galaxy
, like a spiral or ring.
cell.rs
represents a unit of space within a galaxy, and holds all of the identifying information about that unit of space. The galactic terrain is composed of (a variable language quantity of) cells, and come in two types: generic gas clouds and star systems.
src/js/*
handles rendering the data created by the rust backend
The wasm
+ js
apis are loaded into the main application typescript via async imports