Architecture

Parallax separates orchestration in Rust from guest execution in language-specific workers.

System overview

flowchart LR
  CLI["plx / parallax CLI"] --> RT["parallax-runtime<br/>RuntimeManager"]
  RT --> PY["Python adapter"]
  RT --> JS["JS adapter"]
  RT --> WASM["WASM adapter"]
  PY --> PW["python worker.py<br/>NDJSON stdin/stdout"]
  JS --> JW["node worker.js<br/>NDJSON stdin/stdout"]
  WASM --> WT["wasmtime<br/>in-process + fuel"]
  RT --> MIG["parallax-migrate"]
  RT --> SNAP["parallax-snapshot"]
  MIG --> PIR["parallax-ir PIR"]
  SNAP --> PIR

Process model

sequenceDiagram
  participant Core as Parallax Core
  participant Worker as Runtime Worker
  participant Guest as Guest program

  Core->>Worker: hello
  Worker-->>Core: hello ack + host version
  Core->>Worker: execute + capture names
  Worker->>Guest: exec / vm.run
  Guest-->>Worker: bindings
  Worker-->>Core: PIR-tagged JSON bindings
  Core->>Worker: restore bindings
  Worker-->>Core: restored summaries
  Core->>Worker: shutdown

Python and JavaScript guests never share an address space with the core. WASM is the exception: it runs in-process via wasmtime with fuel limits.

Crate map

The workspace ships 22 Rust crates (Event Horizon is one crate — not a meta-workspace explosion).

LayerCrateResponsibility
Coreparallax-coreErrors, IDs, capabilities, execution model, semantic-loss enums
IRparallax-irPIR values, documents, hashing
IRparallax-pcirContinuation IR (Continuum)
IRparallax-puirUniversal Program IR (Transmute)
IRparallax-uesUniversal Execution State, safepoints
Protocolparallax-protocolVersioned NDJSON envelopes
Projectparallax-projectProjectGraph for whole-repo migration
Securityparallax-securitySandbox / limit policy
Diagnosticsparallax-diagnosticsTracing helpers, doctor report types
Snapshotparallax-snapshot.plx format + integrity validation
Migrateparallax-migrateAnalyze + convert PIR across runtimes
Transmuteparallax-transmuteProject analyze → plan → codegen → repair
Mirrorparallax-mirrorLinked sync, semantic diff, CI gates
Horizonparallax-horizonImpossible migration analysis (observe / debt / impossible)
Atlasparallax-adapter-sdkAdapter contracts, manifests, capabilities
Atlasparallax-atlasRegistry, stack detection, parallax.lock
Connectorsparallax-connectors60+ language catalog + experimental workers
Runtimeparallax-runtimeAdapter trait, discovery, worker process, manager
Runtimeparallax-adapter-pythonCPython subprocess adapter
Runtimeparallax-adapter-jsNode.js subprocess adapter
Runtimeparallax-adapter-wasmwasmtime adapter
CLIparallax-cliplx / parallax binaries

Product layers

flowchart TB
  subgraph exec [Execution and value migration]
    CLI1[plx run / migrate / snapshot]
    RT[parallax-runtime]
    PIR[parallax-ir PIR]
    CLI1 --> RT --> PIR
  end
  subgraph project [Project migration]
    TM[parallax-transmute]
    AT[parallax-atlas]
    PUIR[parallax-puir]
    CLI2[plx migrate dir / analyze]
    CLI2 --> AT --> TM --> PUIR
  end
  subgraph sync [Continuous sync]
    MR[parallax-mirror]
    CLI3[plx link / sync / ci]
    CLI3 --> MR
  end
  subgraph horizon [Event Horizon]
    HZ[parallax-horizon]
    CLI4[plx impossible / observe]
    CLI4 --> HZ
  end
Product surfacePrimary cratesTier-1 maturity
Transmutetransmute, puir, project, atlasTypeScript/JS → Rust (weather-api demo)
Mirrormirror, transmuteLinked TS ↔ Rust sync with CI gate
Continuumues, pcir, migrateSame-runtime checkpoint only
Atlasatlas, adapter-sdk120+ detectors; honest maturity
Connectorsconnectors, runtime60+ languages; Ruby/PHP/Go workers experimental
Event HorizonhorizonDynamic/reflection debt analysis

See Atlas adapter index and Horizon.

Migration pipeline

flowchart TD
  A[Source program] --> B[Capture bindings]
  B --> C[PIR document]
  C --> D[Analyze semantic loss]
  D --> E{Policy allows?}
  E -->|no| F[MigrationRejected / Unsupported]
  E -->|yes| G[Convert PIR]
  G --> H[Restore into target worker]
  H --> I[Report timings + findings]
  I --> J[Optional emit / .plx]
  1. Capture — execute source; worker encodes named bindings as PIR JSON
  2. Analyze — classify loss for the target (NONEUNSUPPORTED)
  3. Convert — rewrite PIR under ConversionPolicy
  4. Restore — target worker materializes values
  5. Report — findings + real microsecond timings

Concurrency

RuntimeManager enforces a configurable maximum concurrent adapter operations (default 4). Excess work fails with ResourceLimitExceeded rather than unbounded spawn.