Skip to content

refactor: split spnl into 5 crates under crates/ layout#917

Closed
starpit wants to merge 1 commit into
IBM:mainfrom
starpit:refactor/crates-layout
Closed

refactor: split spnl into 5 crates under crates/ layout#917
starpit wants to merge 1 commit into
IBM:mainfrom
starpit:refactor/crates-layout

Conversation

@starpit
Copy link
Copy Markdown
Member

@starpit starpit commented Feb 27, 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 4 times, most recently from 3ce35e6 to bd9b837 Compare February 27, 2026 22:33
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 bd9b837 to a3ca231 Compare February 27, 2026 22:41
@starpit starpit closed this Feb 28, 2026
@starpit starpit deleted the refactor/crates-layout branch February 28, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant