Quantitative finance · 2026
Lunar Terminal
A native quantitative terminal, rebuilt from the metal up.
The second generation is a full rewrite rather than a fork. Version one proved the product; it also proved that an Electron shell cannot carry a real-time chart surface, a live terminal, an editor and a 3D globe at once. Version two moves the shell to Rust with GPU rendering and keeps every language where it is actually strongest.
- Status
- Active
- Domain
- Trading systems · Native applications
- Role
- Architecture, systems, UI
- Year
- 2026
Stack
- Rust
- GPUI
- Python
- R
- WGSL
- CEF
- DX12 / Metal
- Monaco
A GPU-accelerated cross-platform trading terminal: Rust application shell, Python sidecar for machine learning, an R service for econometric research, and embedded browser panes for AI copilots.
One language per job, on purpose
Rust holds the application shell and the core, because the shell must never stutter.
Python runs as a sidecar for machine learning and AI orchestration, because that is where the ecosystem lives. R runs as a service for econometric research, because reimplementing decades of statistical libraries in another language is a way to introduce bugs, not to remove dependencies. Shaders are WGSL. The UI inside the embedded webviews is plain JavaScript with no transpilation step.
Native rendering, no Electron
The shell renders through DirectX 12 on Windows and Metal on macOS.
That decision buys a chart surface that stays responsive with a live data feed attached, and it makes the more ambitious panes — a real terminal emulator, an embedded editor, a 3D globe — affordable rather than aspirational.
The render loop owes nothing to the model
Inference and rendering live in different processes, and the boundary between them is a message queue rather than a function call.
A model that takes two seconds cannot drop a frame, and a shader that fails to compile cannot take down a training run. The cost is serialisation at the boundary and a harder debugging story; the benefit is that the most latency-sensitive and the least latency-sensitive parts of the application stop competing for the same thread.
AI as a pane, not a dependency
Embedded Chromium panes host AI copilots directly against existing logged-in sessions, so the terminal carries no API keys for the conversational tier.
Model inference that must be local and deterministic runs in the Python sidecar instead. The split keeps credentials out of the application and keeps the reproducible work reproducible.
A rewrite, and the case for one
Rewrites are usually the wrong call, and the reasoning here is specific rather than aesthetic: the shell technology, the rendering model, the process topology and the language boundaries all had to change at once, which leaves very little of the original to keep.
The predecessor is retained as a reference implementation rather than a base — its design documents are the richest inherited artifact, and the behaviours it proved are the specification the rewrite is measured against.
Vendored leverage, read rather than trusted
Several external projects are vendored into the tree rather than pulled as moving dependencies — inference runtimes, agent frameworks, forecasting models.
Vendoring makes the version explicit, makes the code readable at the point of use, and means an upstream change cannot alter behaviour between two builds. The trade is that updates are a deliberate act rather than a lockfile bump, which for a trading application is the correct direction to lean.
Pipeline
Process topology
Stage Can reject
-
01
Market feed
Normalised ticks
-
02
Rust core
Shared state
-
03
GPU shell
Rendered frame
DX12 / Metal
-
04
Python sidecar
Inference
Off the render thread
-
05
R service
Econometrics
-
06
Broker
Orders
Skills exercised
What the build
actually demanded.
Against the corpus · 15 systems
This system Corpus median
Systems
- GPU-accelerated application shells in Rust
- WGSL shader authoring for chart and globe surfaces
- Cross-process IPC between a native shell and language sidecars
- Embedded Chromium integration and lifecycle management
Quantitative
- Real-time market data ingestion and normalisation
- Econometric research served from a dedicated R process
- Model inference isolated from the render loop
- Portfolio and execution state across a process boundary
Product
- Multi-pane terminal interaction design
- Credential-free AI integration
- Cross-platform packaging for Windows and macOS
- Migration strategy from a shipped predecessor
What it establishes
-
GPU-native shell
DX12 on Windows, Metal on macOS
-
Four-language core
Rust · Python · R · WGSL
-
Zero API keys in-app
Conversational AI runs against existing browser sessions
-
Process-isolated inference
A slow model cannot drop a frame
-
Vendored dependencies
Upstream cannot change behaviour between builds