Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Pipeline composition

Platform spec area

Pipeline composition

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Scope

Pipeline composition is Rust-only compiler infrastructure: pass registration, dependency injection between compiler services, phase DAG wiring, and feature-flagged stage enablement.

Mod projects and Beskid Compiler Mod SDK contracts must not mutate this graph. Mods observe compiler snapshots through SDK surfaces only.

Phase ordering and lowering (parse → semantic gates → HIR → CLIF → backends) are specified under Build pipeline / Stage ordering. This area documents how those phases are registered and wired in Rust, not the end-to-end stage list itself. Feature-level articles for composition DAG and pass registration may be added here later; until then, treat stage ordering as the authoritative cross-phase contract.

Boundary

flowchart TB
  subgraph rustPlane [Rust pipeline composition]
    pipeline[beskid_pipeline phase DAG]
    ioc[Compiler service IoC]
  end
  subgraph userPlane [User app composition]
    host[host registry scope launch]
  end
  subgraph modPlane [Compiler mods read-only]
    sdk[Mod SDK contracts]
    hostBridge[mod host bridge]
  end
  userPlane -->|composition.resolve| rustPlane
  modPlane -->|snapshots only| rustPlane
  sdk -.->|must not mutate graph| pipeline
PlaneOwner
Compiler composition / IoCRust (beskid_analysis, beskid_pipeline, related crates)
User DI (host, launch)Language meta / composition
Compiler mods (type: Mod)Compiler Mods + Compiler Mod SDK

User program composition (read-only)

The reference compiler resolves Beskid app composition (Native dependency injection) at compile time. Rust pipeline code materializes a frozen binding plan and composition snapshot for lowering and mod queries; it does not reinterpret host / registry / scope syntax.

Planned phase id: composition.resolve (after semantic.snapshot, before mod.analyze). See Native DI / Flow and algorithm.

Implementation anchors

  • compiler/crates/beskid_pipeline/ — phase ids and observer hooks
  • compiler/crates/beskid_analysis/src/services.rs — session orchestration
  • compiler/crates/beskid_analysis/src/analysis/rules/staged/ — staged semantic pass graph
  • compiler/crates/beskid_analysis — planned composition module for app DI graph (see native DI feature hub)