Skip to content

[M9] Stabilize Rust embedding API over compiler/session workflows #56

Description

@Teakowa

Parent: #10

Depends on: #55

Planning status: provisional until the M8 v1 gate is complete.

Goal

Expose Wright as a reusable Rust library for other projects without requiring subprocess CLI orchestration or access to internal IR layout.

Scope

  • Define stable embedding entry points for project/source loading, compile, check, analyze, inspect/query, and target configuration.
  • Reuse the M6 compiler/session driver rather than duplicating pipeline orchestration.
  • Define owned request/config/result/diagnostic types appropriate for public use.
  • Establish lifecycle/concurrency expectations for one-shot and reusable sessions.
  • Keep internal HIR/WIR arenas and parser implementation details behind the public boundary.
  • Define semver/stability expectations for embedding APIs after v1.

Non-goals

  • Exposing raw mutable IR as the primary public API.
  • Binding the embedding API to MCP, JSON-RPC, or another transport.
  • Providing language-server protocol types.

Acceptance criteria

  • An external Rust consumer can load supported inputs and perform core Wright workflows without invoking the CLI.
  • Public APIs return structured owned results/diagnostics and do not require parsing terminal output.
  • Internal compiler organization can evolve without unnecessarily breaking consumers.
  • API stability/versioning policy is explicit and tested through an external-consumer fixture or equivalent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions