No description
  • TypeScript 56.2%
  • Rust 34%
  • JavaScript 2.7%
  • Makefile 2.4%
  • CSS 1.9%
  • Other 2.8%
Find a file
Kai Siren aa23107289
Some checks are pending
build-publish-deploy / test (push) Waiting to run
build-publish-deploy / deploy (push) Blocked by required conditions
TruffleHog / Scan for secrets (push) Waiting to run
chore: migrate skill directory to .agents/skills
Move the repo-local skill directory from .claude/skills/ to
.agents/skills/, the agent-neutral canonical home. The global
~/.claude/skills/ harness aggregation dir is unchanged.

Closes #74

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Audit-log: coily://1779433758/AGPE5BC6 - coily ops gh issue create
2026-05-22 00:10:52 -07:00
.agents/skills chore: migrate skill directory to .agents/skills 2026-05-22 00:10:52 -07:00
.cargo Fix wasm build by configuring getrandom 0.3 for wasm_js backend 2026-04-13 09:09:44 -07:00
.claude chore: migrate skill directory to .agents/skills 2026-05-22 00:10:52 -07:00
.coily rename: update cross-repo refs after coilyco-ai to agentic-os-kai 2026-05-15 02:29:51 -07:00
.github/workflows fix(deploy): drop tailscale args, v4 retry loop choked on the flags 2026-05-18 13:39:06 -07:00
.vscode wasm build working 2023-11-23 22:09:16 -05:00
benches workflow: match eco-spec-tracker byte-for-byte (drop custom env/steps) 2026-04-21 02:04:30 -07:00
deploy feat(deploy): in-Pod tailscale sidecar + workload on port 80 2026-05-20 00:59:36 -07:00
docs docs: strip galaxySim predecessor pointers per agentic-os-kai#574 2026-05-16 13:24:01 -07:00
e2e application: fold Seed button into a single Generate Galaxy click 2026-04-23 12:56:08 -07:00
src sentry: wire @sentry/browser into the JS bundle 2026-04-23 16:20:58 -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: trim README + AGENTS + FEATURES under 100 lines and 5000 bytes 2026-05-16 00:01:14 -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
AGENTS.md chore: trim README + AGENTS + FEATURES under 100 lines and 5000 bytes 2026-05-16 00:01:14 -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 bump rand 0.9 → 0.10 + getrandom 0.3 → 0.4 2026-04-23 03:00:26 -07:00
CLAUDE.md Convert CLAUDE.md symlink to @AGENTS.md import 2026-04-23 13:35:44 -07:00
coily.yaml deploy: rename config.yml to coily.yaml 2026-05-13 22:50:40 -07:00
development.md workflow: match eco-spec-tracker byte-for-byte (drop custom env/steps) 2026-04-21 02:04:30 -07:00
Dockerfile sentry: wire @sentry/browser into the JS bundle 2026-04-23 16:20:58 -07:00
eslint.config.mjs Add Playwright E2E pipeline, modernize tooling, restyle UI 2026-04-20 23:33:12 -07:00
LICENSE Create LICENSE 2018-05-14 01:20:53 -07:00
makefile lint: sync Makefile descriptions to coily.yaml for coily lint 2026-05-11 19:50:15 -07:00
package-lock.json deps: drop crypto-browserify polyfill, override uuid -> 14, fixes #29 2026-04-24 18:43:42 -07:00
package.json deps: drop crypto-browserify polyfill, override uuid -> 14, fixes #29 2026-04-24 18:43:42 -07:00
playwright.config.ts e2e: WebGPU select + smoke + CPU/WebGPU parity tests 2026-04-23 03:13:48 -07:00
postcss.config.js Add Playwright E2E pipeline, modernize tooling, restyle UI 2026-04-20 23:33:12 -07:00
readme.md docs: strip galaxySim predecessor pointers per agentic-os-kai#574 2026-05-16 13:24:01 -07:00
tsconfig.json feat: WebGPU compute-shader module (webgpu.ts) 2026-04-23 03:03:57 -07:00
webpack.config.js deps: drop crypto-browserify polyfill, override uuid -> 14, fixes #29 2026-04-24 18:43:42 -07:00

galaxy-gen

{ rust → wasm → js } galaxy generation simulation. Gravitational physics (Newton's law on a cell grid) computed in Rust, compiled to WebAssembly via wasm-pack, rendered in the browser with React + D3.

Quick start

make install     # cargo build + wasm-pack + npm install + playwright browsers
make dev         # rust/wasm watcher + webpack-dev-server (dual auto-reload)
make test        # rust unit tests + Playwright E2E

See the makefile for the full set of targets and AGENTS.md for the conventions.

Architecture

  • src/rust/galaxy.rs — core simulation (Galaxy + Cell structs, cell types Gas / Star / Planet / White Hole, gravity, seeding, tick). Unit tests live in mod tests_* blocks at the bottom of the file.
  • src/rust/lib.rs — crate root; re-exports galaxy.
  • pkg/wasm-pack output: .wasm + .js + .d.ts. Gitignored; linked into node_modules/galaxy_gen_backend by npm install ./pkg.
  • src/js/lib/galaxy.tsFrontend class; the JS ↔ WASM boundary.
  • src/js/lib/application.tsx — React UI (inputs, buttons, data-testids).
  • src/js/lib/dataviz.tsx — D3 scatter plot into #dataviz.
  • src/js/lib/styles.css — Tailwind v4 + custom coilysiren 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. One non-obvious prerequisite: the pre-commit pipeline includes a coily-trailer hook that calls coily, a CLI used to audit and trail commits across this workspace. Install it before your first commit, or the hook will fail.

Deployment

Deployed to galaxy-gen.coilysiren.me. Docker image published to GitHub Container Registry, served through Caddy on k3s on kai-server via Tailscale. See the deploy GitHub Actions workflow for the pipeline.

Commands

Dev commands are declared in .coily/coily.yaml. Run them as coily exec <verb>.

See also

Cross-reference convention from coilysiren/agentic-os#59.