Repository navigation
Closed
Labels
area:coremlxcel-core: MLX FFI, primitives, KV cache, layerspriority:mediumMedium prioritystatus:doneCompletedtype:refactorCode restructuring without changing functionality
Milestone
Description
Follow-up to #1 / #3 — discovered while writing the OSS release follow-up and verified against past notes.
Problem
The repo's root Cargo.toml is a single-package manifest (no [workspace]), and src/lib/mlxcel-core / src/lib/mlxcel-surgery are pulled in via path = ... dependencies. Each of those crates carries its own Cargo.lock, which causes several developer-experience problems:
- Running
cargo test -p mlxcel-corefrom the repo root fails on dev-dependency resolution (e.g.tracing-testnot resolved against the root lock). Contributors have tocd src/lib/mlxcel-coreto test the core library. cargo deny checkfrom the repo root only audits the root lock; themlxcel-coreandmlxcel-surgeryper-crate locks are not covered unless re-run inside each directory.- Per-crate
Cargo.lockfiles can drift apart, producing builds where the same transitive dep resolves to different versions depending on entry crate. - Dependabot in PR chore: add OSS security automation and community health files #3 needs three separate
directory:entries (root, mlxcel-core, mlxcel-surgery) precisely because of this layout; a true workspace would need only one.
Tasks
- Add
[workspace]to the rootCargo.tomlwithmembers = ["src/lib/mlxcel-core", "src/lib/mlxcel-surgery"](or usemembers = [".", "src/lib/*"]) - Remove the per-crate
Cargo.lockfiles fromsrc/lib/mlxcel-core/andsrc/lib/mlxcel-surgery/ - Verify
cargo build --release --features metal,acceleratestill works end-to-end on macOS Apple Silicon - Verify
cargo test -p mlxcel-corefrom the repo root resolves dev-deps correctly - Verify
cargo deny checkfrom the repo root now covers all three crates' deps - Update
.github/dependabot.ymlto a single root-level cargo entry (the three sub-entries become redundant once the workspace lock is unified) - Verify the MLX C++ build cache markers (
src/lib/mlx-cpp/CMakeLists.txt,src/lib/mlxcel-core/build.rsMLX_EXPECTED_COMMIT) still trigger correctly with the workspace layout
Risks
- The current independent-lock layout was chosen historically for a reason (per-crate version pinning for the C++ FFI side?). Verify with
git log Cargo.lockand the original author before deleting. - Some transitive deps may resolve to a different version under a unified lock and behave subtly differently. Run the full test suite and a representative model inference benchmark before / after.
Refs
- Follows up on chore: complete OSS release rollout #1, chore: add OSS security automation and community health files #3
- Long-standing gap referenced in internal notes (
mlxcel-core non-workspace Cargo.lock dev-dep 이슈 여전 — sub-agents work around by running cargo inside src/lib/mlxcel-core/)
Metadata
Metadata
Assignees
Labels
area:coremlxcel-core: MLX FFI, primitives, KV cache, layerspriority:mediumMedium prioritystatus:doneCompletedtype:refactorCode restructuring without changing functionality
Activity
chore: add OSS security automation and community health files (#3)
refactor: convert mlxcel-core and mlxcel-surgery into workspace membe…
chore: add OSS security automation and community health files (lablup#3)
refactor: convert mlxcel-core and mlxcel-surgery into workspace membe…