Procedural galaxy simulation - Rust compiled to WASM, rendered in the browser. Live at https://galaxy-gen.coilysiren.me
  • Rust 58.9%
  • TypeScript 36.1%
  • Shell 1.4%
  • JavaScript 1.3%
  • CSS 0.8%
  • Other 1.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kai Ase Siren 2d977567ee
Some checks failed
build-publish / test (push) Failing after 14m7s
build-publish / publish (push) Has been cancelled
chore: drop CODEOWNERS so agents stop reading a review request as a gate
Forgejo auto-requested Kai's review on every agent pull request because this
repo carried `* @coilysiren`. Branch protection runs `required_approvals: 0`, so
that request never blocked a merge, it only ever looked like one. A standing
review request from the repo owner contradicts the landing lane in the one place
an agent checks before deciding whether it may act.

Fleet sweep tracked at coilyco-bridge/agentic-os-kai#889.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 02:13:33 -07:00
.agents/skills chore(ci): bump the agentic-os hook suite and clear the fallout 2026-08-08 09:37:18 -07:00
.cargo Fix wasm build by configuring getrandom 0.3 for wasm_js backend 2026-04-13 09:09:44 -07:00
.claude Merge branch 'issue-32' 2026-07-10 21:55:28 +00:00
.forgejo/workflows chore: drop CODEOWNERS so agents stop reading a review request as a gate 2026-08-20 02:13:33 -07:00
.github chore: drop CODEOWNERS so agents stop reading a review request as a gate 2026-08-20 02:13:33 -07:00
.vscode wasm build working 2023-11-23 22:09:16 -05:00
.ward feat(just): retire ward exec, move the verb table to a justfile 2026-08-17 13:39:37 -07:00
benches perf(sim): halve the Barnes-Hut traversal node, and let the profiler hold a seed 2026-08-13 18:27:32 -07:00
docs feat(just): retire ward exec, move the verb table to a justfile 2026-08-17 13:39:37 -07:00
e2e test(perf): measure the rate the canvas changes, not the rate rAF fires 2026-08-13 19:28:38 -07:00
scripts feat(just): retire ward exec, move the verb table to a justfile 2026-08-17 13:39:37 -07:00
src feat(sim): give stars orbits the potential they read can hold 2026-08-13 22:00:25 -07:00
.agentic-os.toml docs: split the oversized docs and clear ten grandfathered excludes 2026-08-13 19:57:11 -07:00
.gitignore chore: track .claude/settings.json and lockdown-deny.sh 2026-05-03 21:00:18 -07:00
.pre-commit-config.yaml chore(pre-commit): bump aos-precommit to v0.18.0 and clear the gate 2026-08-11 23:25:46 -07:00
.prettierignore Add Playwright E2E pipeline, modernize tooling, restyle UI 2026-04-20 23:33:12 -07:00
.prettierrc Add Playwright E2E pipeline, modernize tooling, restyle UI 2026-04-20 23:33:12 -07:00
_typos.toml chore(pre-commit): bump aos-precommit to v0.18.0 and clear the gate 2026-08-11 23:25:46 -07:00
AGENTS.md feat(just): retire ward exec, move the verb table to a justfile 2026-08-17 13:39:37 -07:00
Cargo.lock bump rand 0.9 → 0.10 + getrandom 0.3 → 0.4 2026-04-23 03:00:26 -07:00
Cargo.toml test(sim): run the scenario tests at 250 instead of 50 2026-08-08 21:50:29 -07:00
CLAUDE.md Convert CLAUDE.md symlink to @AGENTS.md import 2026-04-23 13:35:44 -07:00
Dockerfile Update Dockerfile 2026-08-10 02:00:56 +00:00
eslint.config.mjs Add Playwright E2E pipeline, modernize tooling, restyle UI 2026-04-20 23:33:12 -07:00
justfile feat(just): retire ward exec, move the verb table to a justfile 2026-08-17 13:39:37 -07:00
LICENSE Create LICENSE 2018-05-14 01:20:53 -07:00
nginx.conf feat(deploy): retire the in-repo deploy surface, move to bridge/deploy (closes #37) 2026-07-20 21:23:46 -07:00
package-lock.json feat(ui): record a run as MP4 as well as GIF 2026-08-06 23:20:18 -07:00
package.json chore(ci): bump the agentic-os hook suite and clear the fallout 2026-08-08 09:37:18 -07:00
playwright.config.ts docs: split the oversized docs and clear ten grandfathered excludes 2026-08-13 19:57:11 -07:00
playwright.gpu.config.ts perf(render): drop the lens framebuffer readback, default to 500x500 2026-08-06 13:38:07 -07:00
postcss.config.js Add Playwright E2E pipeline, modernize tooling, restyle UI 2026-04-20 23:33:12 -07:00
pyproject.toml docs: declare the large documentation band 2026-08-16 20:21:01 -07:00
README.md feat(just): retire ward exec, move the verb table to a justfile 2026-08-17 13:39:37 -07:00
rust-toolchain.toml feat(just): retire ward exec, move the verb table to a justfile 2026-08-17 13:39:37 -07:00
tsconfig.e2e.jsonc chore(ci): bump the agentic-os hook suite and clear the fallout 2026-08-08 09:37:18 -07:00
tsconfig.json feat(ui): record a run as a GIF from the browser 2026-08-06 21:15:24 -07:00
webpack.config.js chore(ci): bump the agentic-os hook suite and clear the fallout 2026-08-08 09:37:18 -07:00

galaxy-gen

Galaxy Generator interface showing an irregular galaxy evolving into a spiral

{ rust → wasm → js } living-galaxy simulation. Gravitational physics, star birth and death, planetary nebulae, Type Ia and core-collapse supernovae, neutron-star mergers, stellar-halo phase mixing, black-hole evolution, conserved chemical enrichment, and a cycling cold/hot gas reservoir are computed in Rust, compiled to WebAssembly via wasm-pack, and rendered on a browser canvas with React.

Heavy elements move with gas and stars through the full lifecycle. Supernovae enrich later generations, while local composition controls the rendered dust lanes and shock-swept [OIII] glow.

Quick start

just install
just dev
just test

See .ward/ward.yaml for the full command catalog and AGENTS.md for the conventions.

Architecture

  • src/rust/galaxy.rs - core gas, stellar, black-hole, event, seeding, and tick simulation. Unit tests live in mod tests_* blocks at the bottom.
  • src/rust/lib.rs - crate root that re-exports galaxy.
  • pkg/ - wasm-pack output: .wasm + .js + .d.ts. Gitignored and linked into node_modules/galaxy_gen_backend by npm install ./pkg.
  • src/js/lib/galaxy.ts - Frontend class and the JS/WASM boundary.
  • src/js/lib/application.tsx - React UI (inputs, buttons, data-testids).
  • src/js/lib/dataviz.tsx - layered canvas renderer in #dataviz.
  • src/js/lib/styles.css - Tailwind v4 + custom palette.
  • e2e/galaxy.spec.ts - Playwright end-to-end tests.
  • dist/ - production webpack build output (gitignored).

Tooling

  • Rust: cargo check / cargo test / cargo fmt / cargo clippy.
  • WASM: wasm-pack build compiles Rust to WebAssembly. The dev server watches pkg/**/* and hot-reloads on rebuild (via cargo watch).
  • JS: webpack 5 + babel (React + TypeScript presets). Tailwind v4 via PostCSS.
  • Lint/format: ESLint flat config (eslint.config.mjs) + Prettier.
  • Tests: Rust unit tests via cargo test; browser end-to-end via Playwright (npm run test:e2e).
  • CI: GitHub Actions runs rust, js, and e2e jobs on every push/PR to main.

Similar projects

Open-source galaxy / n-body / WASM-sim projects worth studying. Surfaced with admiration.

  • andrewdcampbell/galaxy-sim - real-time browser N-body, Three.js + WebGL, runtime controls and free-orbit camera.
  • magwo/fullofstars - the original real-time N-body galaxy toy this project's art direction takes after. Pure JS + WebGL, no build step.
  • simbleau/nbody-wasm-sim - 2D N-body, Rust + wgpu, force kernel runs as a WebGPU compute shader.
  • MichaelJCole/n-body-wasm-webvr - browser universe in WebVR, physics in a Web Worker, AssemblyScript -> WASM.
  • someguynamedmatt/gravity - compact gravity sim on the same Rust + wasm-bindgen toolchain. Bare-surface reference.
  • zotho/rust_n_body - Rust N-body with native + WASM builds from one crate. Integrator-focused.
  • aestuans/blob - Rust -> WASM showcase, 2D fluid + gravity in one sim, renders WebGL from the WASM side.
  • DrA1ex/JS_ParticleSystem - 1M particles in real time. Hierarchical spatial-tree O(N log N) + pluggable CPU/GPGPU backends + record-replay.
  • davrempe/webgl-nbody-sim - 3D N-body in vanilla WebGL, no build step.
  • holmgr/gemini - sci-fi trading-and-smuggling over a procedurally generated galaxy. Terminal UI over a Rust core.

Contributing

External contributors are welcome. The pre-commit pipeline includes the ward lockdown checks and audit trail hooks that guard this workspace. Run them before your first commit, or the hook will fail.

Deployment

Deployed to galaxy-gen.coilysiren.me. The deploy surface lives in the deploy monorepo (coilyco-bridge/deploy, services/galaxy-gen/), which serves the source-owned image with unprivileged nginx on k3s. A push to main first tests the Rust core, then publishes the private image as forgejo.coilysiren.me/coilyco-gaming/galaxy-gen:<full-source-sha>. The deploy repo owns the separate read-only forgejo-registry pull credential, chart, rollout, and public ingress.

Validate the local image and publisher through Ward:

just image-publish-check
just build-docker

Commands

Dev commands are declared in the justfile. Run them as just <verb>, and run just alone to list every one.

See also

Cross-reference convention from agentic-os#59.