Skip to content

refactor: convert mlxcel-core and mlxcel-surgery into workspace members - #15

Merged
inureyes merged 1 commit into
mainfrom
refactor/issue-7-workspace-members
May 18, 2026
Merged

inureyes merged 1 commit into
mainfrom
refactor/issue-7-workspace-members

Conversation

@inureyes

Copy link
Copy Markdown
Member

Summary

  • Add [workspace] section to root Cargo.toml (Option A: root crate is simultaneously the workspace root) with members = [".", "src/lib/mlxcel-core", "src/lib/mlxcel-surgery"] and resolver = "2".
  • Collapse .github/dependabot.yml from three separate cargo entries into a single root-level entry covering the unified workspace lock.

Pre-flight finding

Per-crate Cargo.lock files in src/lib/mlxcel-core/ and src/lib/mlxcel-surgery/ were already absent — Task 2 from the issue body ("Remove the per-crate Cargo.lock files") was a no-op. The actual scope was just adding [workspace] and simplifying dependabot.yml.

What changed

  • Cargo.toml: Added [workspace] table before [package]; three crates are now workspace members.
  • Cargo.lock: Unified lock now includes the previously missing dev-dep entries from mlxcel-core: sha2 0.11, tracing-test 0.2.6, tracing-test-macro 0.2.6. These were previously invisible to the root lock, causing cargo test -p mlxcel-core from root to fail on dev-dep resolution.
  • .github/dependabot.yml: Collapsed three separate cargo entries (root, mlxcel-core, mlxcel-surgery) into a single root-level entry. The github-actions entry is unchanged.

Verification

  • cargo metadata --no-deps confirms all three crates appear in workspace_members.
  • cargo check --lib -p mlxcel-core --no-default-features passes — workspace dep resolution is correct without triggering the full MLX C++ build.
  • cargo deny check passes — pre-existing duplicate warnings for tower / tower-http are unaffected by the workspace migration.
  • CONTRIBUTING.md has no workaround note about cd src/lib/mlxcel-core — no documentation changes needed.

Closes #7

Add [workspace] section to the root Cargo.toml (Option A: root crate is also a workspace root) with members = [".", "src/lib/mlxcel-core", "src/lib/mlxcel-surgery"] and resolver = "2". This unifies the dependency graph so that cargo test -p mlxcel-core and cargo test -p mlxcel-surgery resolve dev-dependencies (e.g. tracing-test) correctly from the root, eliminating the need to cd into each sub-crate directory to run tests.

Per-crate Cargo.lock files in src/lib/mlxcel-core/ and src/lib/mlxcel-surgery/ were already absent — no files were deleted. The unified Cargo.lock now includes the previously missing dev-dep entries (sha2 0.11, tracing-test 0.2.6, tracing-test-macro 0.2.6) from mlxcel-core.

Collapse dependabot.yml from three separate cargo entries (root, mlxcel-core, mlxcel-surgery) into a single root-level cargo entry covering the unified workspace lock. The github-actions entry is unchanged.

cargo deny check passes after the consolidation (pre-existing duplicate warnings for tower and tower-http are unaffected). cargo check --lib -p mlxcel-core --no-default-features also passes, confirming workspace dep resolution is correct.
@inureyes inureyes added status:review Under review type:refactor Code restructuring without changing functionality priority:medium Medium priority area:core mlxcel-core: MLX FFI, primitives, KV cache, layers labels May 18, 2026
@inureyes
inureyes merged commit db35c68 into main May 18, 2026
3 of 4 checks passed
@inureyes
inureyes deleted the refactor/issue-7-workspace-members branch May 18, 2026 08:44
@inureyes inureyes self-assigned this May 18, 2026
@inureyes inureyes added status:done Completed and removed status:review Under review labels May 18, 2026
@inureyes inureyes added this to the 0.1 milestone Jun 21, 2026
be-free-snowboy pushed a commit to freestylejs/snowbrain-mlxcel that referenced this pull request Oct 27, 2026
…rs (lablup#15)

Closes lablup#7.

Adds `[workspace]` section to root `Cargo.toml` with Layout A: the
root `mlxcel` crate is simultaneously the workspace root and a member,
alongside `mlxcel-core` and `mlxcel-surgery`. `cargo metadata`
confirms all three crates enumerate as workspace members.

`.github/dependabot.yml` collapsed from 3 separate cargo entries
(root, mlxcel-core, mlxcel-surgery) to 1 root-level entry — the
unified workspace lock makes per-directory entries redundant. The
`github-actions` entry is unchanged.

Pre-flight finding: per-crate Cargo.lock files referenced in lablup#7
task list were already absent. Actual scope reduced to `[workspace]`
addition + dependabot.yml simplification. The Cargo.lock gained 7
mlxcel-core dev-dependencies (sha2 0.11, block-buffer 0.12,
const-oid 0.10.2, crypto-common 0.2.1, hybrid-array 0.4.12,
tracing-test 0.2.6, tracing-test-macro 0.2.6) that were previously
invisible to the root lock and are now properly unified — this is
what fixes the long-standing `cargo test -p mlxcel-core` from-root
dev-dep resolution failure.

Verified locally: `cargo deny check` clean, `cargo check --lib
-p mlxcel-core --no-default-features` clean. Self-hosted clippy +
test gate (added in lablup#14) is queued at merge time — will run on
main after the runner clears the PR lablup#14 cold-build backlog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core mlxcel-core: MLX FFI, primitives, KV cache, layers priority:medium Medium priority status:done Completed type:refactor Code restructuring without changing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: convert mlxcel-core and mlxcel-surgery into workspace members

1 participant