Move every crate under crates/ and reach them all by feature - #73
Merged
Conversation
Moved all crates into a top-level `crates/` directory and removed several unused test and module files to clean up the project structure. This change consolidates the codebase into a standard Cargo workspace layout without altering any runtime behaviour. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Move every package into a `crates/` directory, one directory per package, and replace the explicit member list with a glob. Remove the root package entirely so the workspace stays virtual and every crate is structurally uniform. Update the patch path for `tinymemory-api` to match the new layout and add `worktrees` to the exclude list so cargo does not walk into git worktree checkouts. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Remove several unused crate dependencies from tinymemory's Cargo.toml and clean up unused imports in test files across the store module. This reduces compilation overhead and clarifies which dependencies are actually needed for the store's functionality. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update all six tinymemory crate versions from 0.1.0 to 0.2.0 to prepare for the next release cycle, ensuring consistent versioning across the workspace. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the tinymemory-core crate version from 0.1.0 to 0.2.0 in its Cargo.toml to reflect new changes, and adjusted the tinymemory-module dependency accordingly to maintain compatibility. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add conditional re-exports for the core, sync, sources, and conformance crates behind their respective feature flags, so that hosts can select exactly the subsystems they need through a single dependency on tinymemory rather than pulling in each crate individually. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The lockfile is updated to include the newly added `tinymemory-core` and `tinymemory-sources` dependencies, ensuring the resolved versions are recorded for reproducible builds. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The engine containment script now references the renamed `crates/tinymemory-core/src/` directory instead of the old `core/src/` path, matching the project's new crate layout. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the workflow file to reflect the renamed crate path from `api/Cargo.toml` to `crates/tinymemory-api/Cargo.toml` in a comment, and changed the example run command to use the explicit package flag `-p tinymemory` instead of the default workspace example. These changes keep the CI configuration consistent with the current project structure. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The release workflow previously used `cargo metadata`'s first package, which is unreliable in a virtual workspace where the root manifest has no package. The workflow now explicitly selects the `tinymemory` facade crate by name, updates its `Cargo.toml` instead of the root, and adjusts comments and `git add` paths accordingly. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
# Conflicts: # Cargo.toml # crates/tinymemory-remote/src/cognee_graph.rs # crates/tinymemory-remote/src/graph_provider.rs # crates/tinymemory-remote/src/mem0_graph.rs
The README now reflects the new flat `crates/` directory structure with individual packages, replacing the old top-level `api/`, `src/`, `core/`, and `adapters/` layout. A new Features section documents the `tinymemory` facade's feature flags and their dependency relationships, making it clear how hosts can select only the capabilities they need. File paths throughout the document are updated to match the new crate locations. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…dle of a path The description of the submodule requirement was wrapped at an awkward point, splitting a path reference across two lines. The paragraph is now reflowed so the path stays on one line and the line breaks occur at natural sentence boundaries instead. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the project structure documentation to reflect the migration from a root-package workspace to a virtual-root workspace where every crate lives under `crates/`. The change clarifies that there is no root package, that `members` is the glob `crates/*`, and that the facade, contract, subsystems, and adapters each live in their own crate directory. It also updates the directory tree, the build commands, the lint configuration, and the testing and documentation sections to match the new layout, so that contributors have accurate guidance for working with the restructured workspace. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Rewrap several paragraphs to stay within a consistent line length, and make two references more precise: the public surface is now exported from "the crate's `src/lib.rs`" instead of just "`src/lib.rs`", and the release workflow updates `crates/tinymemory/Cargo.toml` rather than the generic `Cargo.toml`. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a short paragraph explaining that the feature table shows which crate each feature brings in, and direct readers to the engine table for details on what each engine feature serves, including driver class and capability families. Also reflow two long lines to stay within the 72-character column limit. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The README referenced an outdated path for the Cognee constructor note, pointing to `adapters/remote/src/cognee.rs` instead of the current `crates/tinymemory-remote/src/cognee.rs`. This update fixes the path to match the actual project structure. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update three file path references that were left pointing to old locations after the crate restructuring, replacing `adapters/` prefixes with the correct `crates/tinymemory-` paths in the testing-ui README, the tinycortex example, and the driver selection test. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update two inline comments that referenced the old `adapters/remote` path to point to the current `crates/tinymemory-remote` location, ensuring the documentation accurately reflects the project's directory structure. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
Important Review skippedToo many files! This PR contains 430 files, which is 330 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (430)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Every crate in the repository now lives in its own directory under
crates/,named for the package it holds, and the facade reaches all of them through a
feature named after each one. Before this, the workspace was spread across four
different conventions — a root package,
api/,core/,sync/,sources/,conformance/,adapters/*, andcrates/*— so where a crate lived told younothing about what it was.
The workspace root is now virtual: no root package, and
membersis theglob
crates/*, so a new crate joins the workspace by existing rather than bybeing added to a list someone has to remember to update.
./(src/,tests/,examples/)crates/tinymemoryapi/crates/tinymemory-apicore/crates/tinymemory-coresync/crates/tinymemory-syncsources/crates/tinymemory-sourcesconformance/crates/tinymemory-conformanceadapters/tinycortex/crates/tinymemory-tinycortexadapters/remote/crates/tinymemory-remotecrates/tinymemory-modulekeeps its own workspace root (the tinybus[workspace.package]inheritance problem documented inCargo.tomlisunchanged), and
crates/tinymemory-testing-uistays a normal member held out ofdefault-members, exactly as it was onmain.Public API and behavior changes
Additive only. No existing path moved or was renamed, and no behavior
changed.
tinymemorygains features and the re-exports behind them:coretinymemory::core— the memory subsystemsynctinymemory::sync— the Composio normaliserssourcestinymemory::sources— source contracts and local readerssources-networksources, plus the GitHub/RSS/web-page readersconformancetinymemory::conformance— the driver contract suitecontactscore)enginestest-supportfulltest-supporttinycortex,supermemory,mem0,cogneeandmemory-gitare unchanged.Nothing is on by default, and the minimal build is still 39 crates against
its ceiling of 50 — a host that names no feature still gets the contract, the
registry and the mandatory composition, with no storage engine, HTTP stack, or
native library.
Two deliberate choices worth flagging:
capability cannot produce a build where nothing implements it.
test-supportis outsidefull. "Give me the whole workspace" is not thesame request as "give me the test doubles", and rolling them together is how a
test harness reaches a release build.
tinymemory-coredepends ontinymemoryas a dev-dependency while thefacade now depends on
tinymemory-coreas an optional normal one. Cargo permitsthat — a cycle closed by a dev-dependency edge is not a build cycle — but the
core side has to stay dev-only, and there is a comment on the dependency saying
so.
Tooling updated with the move
release.yml— the root is virtual, so.packages[0]is whichever membercargo happens to list first. It now selects
tinymemoryby name, and theversion bump and
git addtargetcrates/tinymemory/Cargo.toml.ci.yml—cargo run -p tinymemory --example basic; cargo can no longerinfer which package an example belongs to.
scripts/ci/engine-containment.sh— points atcrates/tinymemory-core/src.AGENTS.md/CLAUDE.mdstructure section, and stale paths in doc comments across theworkspace. There is no
adapters/reference left anywhere in the repository.Validation
All run locally from the worktree, after merging
upstream/main:cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo build --workspace --all-targets --all-featurescargo test --all-featurescargo test --doc --all-featuresRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features./scripts/ci/dependency-budget.sh./scripts/ci/engine-containment.shcargo tree -p tinymemory-api -e normal,buildforbidden-dep grepcargo build -p tinymemory --no-default-features+--test null_providercargo clippy -p tinymemory-tinycortex --no-default-features -- -D warningscargo run -p tinymemory --example basiccargo build --locked --release,cargo test --libThe module crate's loader E2E (
--ignored, one process per test) was not runlocally; CI's
modulejob covers it.Merge with
mainThis branch merges
upstream/mainat c027b8b, which landed the remote-adapterretry logic, the Cognee/Mem0 graph providers, cloud API-key auth, and the
testing UI. Git's rename detection carried those changes onto the new paths
cleanly. Two conflicts were resolved by hand:
memberswhile preservingmain's intentby spelling out
default-memberswithouttinymemory-testing-ui;crates/tinymemory-testing-ui/Cargo.toml's path dependencies.Deliberately not done
No
[workspace.package]or[workspace.dependencies]inheritance. It is theobvious next step now that the layout is uniform, but it touches every manifest
and would bury the move in churn — worth its own change.
Related issue
None.