{ rust => wasm => js } galaxy generation simulation
AGPL-3.0 License
{ rust => wasm => js }
galaxy generation simulation
previous verison, written in python
$ make install
$ make dev
./src/rust/
is the rust backend, with wasm-bindgen decorators. the first build stage runs rust tests via cargo test
./pkg/
is created via wasm-pack, which compiles the rust code to wasm
+ js
+ typescript
./src/js/
imports ./pkg/
and runs js tests via npm test
./dist/
is created via webpack, which compiles everything mentioned above + angular
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