Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/silicon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Silicon and brain
on: [pull_request]
permissions:
contents: read
jobs:
sources-and-models:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "22"
- run: node tests/hardware-catalog.mjs
- run: node tests/architecture.mjs
- run: node tests/timescales.mjs
- run: python3 tools/check_content.py
- run: cargo test -p doke-core --locked
browser-and-wasm:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "22"
- run: rustup target add wasm32-unknown-unknown
- run: cargo install wasm-bindgen-cli --version 0.2.100 --locked
- run: cargo build -p doke-web --target wasm32-unknown-unknown --release --locked
- run: wasm-bindgen target/wasm32-unknown-unknown/release/doke_web.wasm --target web --out-dir public/pkg --out-name doke
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: node tests/silicon-wasm.mjs
- name: Exercise rendered dataflow and controls
run: |
python3 -m http.server 4181 --bind 127.0.0.1 --directory public > /tmp/doke-preview.log 2>&1 &
DOKE_SERVER_PID=$!
trap 'kill "$DOKE_SERVER_PID"' EXIT
DOKE_SKIP_BRAIN=1 node tests/focused-browser.mjs
DOKE_SKIP_BRAIN=1 node tests/hardware-expansion.mjs
node tests/interaction-review.mjs
42 changes: 18 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,35 @@
# doke

A floating, interactive brain explorer built with Rust, WebAssembly and wgpu. Explore reference anatomy, an enlarged neural tissue window, chemical synapses, a neural circuit and molecular messengers. Mostly grayscale, with restrained color accents and adaptive HDR.
Look inside CPUs, GPUs, a tensor processor, a network ASIC and the human brain. A floating 3D explorer with source-linked architecture, close-up execution, and an input you can change.

![A short tour of doke: brain anatomy, activity playback, enlarged neurons, synaptic signaling, neural circuits, molecular messengers and scientific source tabs.](docs/media/doke-demo.gif)
Start with the whole processor, open a core or streaming multiprocessor, then follow one value through actual operand reads and arithmetic. Choose Ryzen 9 9950X, RTX 5090, H100 SXM, Google TPU v1 or Cisco Silicon One G200 from one hardware selector. These are original functional schematics, not physical die floorplans.

*A 24-second tour of the real app, captured with SDR glow. [Recording instructions](docs/GUIDE.md#recording-a-demo).*
The Rust models compute editable matrix transforms or route packets through queues. Inspect returned operands, cache residency, requested GPU sectors and each completed product. Model ticks are authored teaching time, not vendor cycles or chip benchmarks. The human reference atlas remains available on its own or alongside the chip, with sourced anatomy and a visual-processing guide. A shared logarithmic time scale compares documented chip clock periods with human physiological measurements; their conditions and limits are one click away.

![Inside an RTX Blackwell streaming multiprocessor](docs/media/compute-explorer.webp)

## Run locally

Follow the [first-time setup](docs/GUIDE.md#building-from-a-fresh-clone) to install the tools and generate the anatomy assets. Then:
See the [setup guide](docs/GUIDE.md#build-and-run) for first-time dependencies and anatomy generation. After setup:

```sh
bash tools/build.sh
python3 tools/serve.py
```

Open [localhost:4173](http://localhost:4173). Rendering and simulation run in the browser; the server serves static files.

The [doke guide](docs/GUIDE.md) covers controls, scientific interpretation, builds, verification and hosting. It is the single maintained project guide.

## What is calculated

Brain geometry derives from the Allen Human Reference Atlas; molecule coordinates come from PubChem. Activity highlights, enlarged neurons, synaptic contacts and traveling particles illustrate supported concepts. They are not reconstructed individual cells or measured firing/chemical concentrations. The simplified neural circuit integrates population dynamics in Rust. Source records and scientific limitations are available in the interface.

## Source map
Open [localhost:4173](http://localhost:4173). Everything runs in the browser; hosting only serves static files.

| Directory | Purpose |
| ------------------ | ---------------------------------------------------- |
| `crates/doke-core` | Activity envelopes and numerical E/I model |
| `crates/doke-web` | Rust rendering, camera, procedural cells, shaders |
| `public` | Floating interface, source records, runtime assets |
| `tools` | Asset generation, validation, builds and deployment |
| `tests` | Browser, playback, HDR, fallbacks and hosting checks |
| `docs/GUIDE.md` | Usage, development and publishing guide |
- [Guide](docs/GUIDE.md): controls, builds, verification and hosting.
- [Architecture and model scope](docs/SILICON.md): sources, what is calculated, and next steps.

## Repository contents and attribution
## Repository

Generated Wasm, anatomy binaries, downloaded source data, packaged builds, test screenshots, historical working notes and private deployment settings are excluded from Git. Keep the required fallback image, local fonts, source metadata and third-party notices: they are part of the application.
| Path | Purpose |
| ------------------ | ----------------------------------------------------------------- |
| `crates/doke-core` | Deterministic execution models and bounded snapshots |
| `crates/doke-web` | Rust/Wasm rendering, geometry, camera and HDR |
| `public` | Interface, source records, anatomy metadata and runtime assets |
| `tools` | Reproducible anatomy generation, validation, builds and packaging |
| `tests` | Source, geometry, execution, browser and static-hosting checks |

Atlas attribution is in [the asset notice](public/assets/NOTICE.md), font licenses in `public/fonts/`, and Rust dependency notices in `public/licenses/`. A license for doke's original source code has not been selected; third-party licenses apply to their respective material.
Generated Wasm, anatomy binaries, downloads, packaged builds, raw screenshots and local deployment settings are ignored. Retain the [atlas notice](public/assets/NOTICE.md), font licenses and dependency notices when distributing the app. A license for doke's original source has not yet been selected; third-party materials retain their respective licenses.
Loading
Loading