- Rust 58.9%
- TypeScript 36.1%
- Shell 1.4%
- JavaScript 1.3%
- CSS 0.8%
- Other 1.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
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> |
||
| .agents/skills | ||
| .cargo | ||
| .claude | ||
| .forgejo/workflows | ||
| .github | ||
| .vscode | ||
| .ward | ||
| benches | ||
| docs | ||
| e2e | ||
| scripts | ||
| src | ||
| .agentic-os.toml | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .prettierignore | ||
| .prettierrc | ||
| _typos.toml | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CLAUDE.md | ||
| Dockerfile | ||
| eslint.config.mjs | ||
| justfile | ||
| LICENSE | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.ts | ||
| playwright.gpu.config.ts | ||
| postcss.config.js | ||
| pyproject.toml | ||
| README.md | ||
| rust-toolchain.toml | ||
| tsconfig.e2e.jsonc | ||
| tsconfig.json | ||
| webpack.config.js | ||
galaxy-gen
{ 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 inmod tests_*blocks at the bottom.src/rust/lib.rs- crate root that re-exportsgalaxy.pkg/-wasm-packoutput:.wasm+.js+.d.ts. Gitignored and linked intonode_modules/galaxy_gen_backendbynpm install ./pkg.src/js/lib/galaxy.ts-Frontendclass 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 buildcompiles Rust to WebAssembly. The dev server watchespkg/**/*and hot-reloads on rebuild (viacargo 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, ande2ejobs on every push/PR tomain.
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
- AGENTS.md - agent-facing operating rules.
- docs/FEATURES.md - inventory of what ships today.
- justfile - dev verbs.
- .ward/ward.yaml - catalog metadata only.
Cross-reference convention from agentic-os#59.
