Skip to content

Record the core/shell crate split in the spec - #24

Merged
omesser merged 1 commit into
mainfrom
docs/23-core-crate-decision
Aug 28, 2026
Merged

omesser merged 1 commit into
mainfrom
docs/23-core-crate-decision

Conversation

@omesser

@omesser omesser commented Aug 27, 2026 •

Copy link
Copy Markdown
Owner

Towards #23. Decision only — no code moves here.

What changed

docs/SPEC.md "Overall shape" now states the crate layout: a core crate
holding the Engine, the overlay hit-testing arithmetic and Memory, depending on
neither tauri nor any platform binding; and a shell crate depending on it,
holding main.rs, the Tauri setup, the AppKit panel work and WindowSource.

Why it looks like this

The spec already calls the Engine "pure, synchronous, no I/O" and the primary
test seam. The source honours that — engine.rs has no imports outside its own
test module. The crate does not: everything lives in ai-buddy, which depends on
tauri and objc2, so cargo test links the whole platform stack to run
arithmetic, and .github/workflows/tests.yml has to skip the Rust hooks on Linux
and run a second macOS job instead.

The point of writing it down is that purity becomes a build property rather than
a property of the source. Today nothing would fail if a change imported Tauri
into the Engine.

It also settles the case most likely to be argued: Memory does file I/O and still
belongs in core, because the rule is no platform or toolkit dependency, not no
I/O.

How to verify

Documentation only. No code changed, so there is nothing to run beyond CI.

Known and deferred

🤖 Generated with Claude Code

@omesser
omesser force-pushed the docs/23-core-crate-decision branch from 03f3e88 to 81ee0f5 Compare August 28, 2026 02:28
The spec already says the Engine is pure with no I/O, and the source
honours it. The crate does not: everything lives in one crate that
depends on tauri and objc2, so cargo test links the platform stack to
run arithmetic, the Rust checks cannot run on Linux at all, and nothing
would fail if a future change imported Tauri into the Engine.

Writing the layout down makes the boundary a build property instead of a
convention, and names where Memory belongs, which is the case most
likely to be argued: it does file I/O but has no platform dependency, so
it is core.

Decision only. The layout stays single-crate until issue #23 lands,
which is sequenced after the three open branches merge to avoid
conflicting with all of them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@omesser
omesser force-pushed the docs/23-core-crate-decision branch from 81ee0f5 to 0a042ed Compare August 28, 2026 02:30
@omesser
omesser merged commit d140973 into main Aug 28, 2026
2 checks passed
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