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.
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
Non-goals
Acceptance criteria