Skip to content

refactor: split spnl monolith into 5 crates under crates/ layout#919

Merged
starpit merged 1 commit into
mainfrom
refactor/crates-layout
Mar 1, 2026
Merged

refactor: split spnl monolith into 5 crates under crates/ layout#919
starpit merged 1 commit into
mainfrom
refactor/crates-layout

Conversation

@starpit
Copy link
Copy Markdown
Member

@starpit starpit commented Feb 28, 2026

Summary

  • Split the spnl monolith into 5 crates under a conventional crates/ directory layout
  • spnl-core: IR types, simplify transforms, capabilities, LLO tokenizer (minimal deps, no async)
  • spnl-run: execute engine, generate backends, augment, HLO optimizer (async, heavy deps)
  • spnl-ffi: Python FFI bindings (cdylib, maturin build target)
  • spnl: backward-compatible facade re-exporting core + run
  • spnl-cli: CLI binary (moved from cli/)
  • Updated all CI workflows for new paths and multi-crate publish order (core → run → spnl)
  • All 33 existing tests pass across the workspace

Dependency graph

spnl-cli → spnl (facade) → spnl-core + spnl-run → spnl-core
spnl-ffi → spnl-run → spnl-core

Test plan

  • cargo check -p spnl-core compiles independently
  • cargo check -p spnl-run compiles with core dependency
  • cargo check -p spnl facade compiles and re-exports work
  • cargo build -p spnl-cli CLI builds (via manifest-path)
  • cargo test — 33 tests pass (21 core, 12 run)
  • cargo check -p spnl-run --features rag,openai,ollama feature-gated compilation
  • cargo fmt --all -- --check formatting clean
  • maturin develop -m crates/spnl-ffi/Cargo.toml — Python wheel builds
  • CI workflows pass with updated paths

🤖 Generated with Claude Code

@starpit starpit force-pushed the refactor/crates-layout branch 2 times, most recently from 430697a to b93fe03 Compare February 28, 2026 22:49
Split the monolithic `spnl` crate into a multi-crate workspace:

- spnl-core: IR types, simplify, capabilities, LLO tokenizer (minimal deps)
- spnl-run: execution engine, generate backends, RAG, optimizer (async, heavy deps)
- spnl-ffi: Python FFI bindings via PyO3/maturin
- spnl: facade crate re-exporting core + run for backward compatibility
- spnl-cli: CLI binary (moved from cli/)

Update all CI workflows, Dockerfiles, and docs to reflect new crates/ paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Nick Mitchell <nickm@us.ibm.com>
@starpit starpit force-pushed the refactor/crates-layout branch from b93fe03 to 763adf5 Compare March 1, 2026 00:14
@starpit starpit merged commit b621487 into main Mar 1, 2026
36 checks passed
@starpit starpit deleted the refactor/crates-layout branch March 1, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant