Parent
Part of #1402.
Goal
Convert the repo into a Cargo workspace and add a root-level core/ crate (Tauri-independent). Establishing the workspace boundary is what enforces "no tauri::* under core/" — at compile time, via the Cargo dependency graph, with no CI grep needed.
This issue replaces #1403; see #1402 for the reasoning behind the switch from src-tauri/src/core/ to a workspace crate.
Scope
- Add a workspace
Cargo.toml at the repo root with members core and src-tauri.
- Create
core/ crate at the repo root:
core/Cargo.toml — does not list tauri as a dependency. Package name TBD in this PR (e.g. hwviz-core to avoid shadowing the standard core crate).
core/src/lib.rs — empty pub mod placeholders for collector, persistence, monitoring, event_bus, settings, platform, infrastructure, models. No code is moved yet.
src-tauri/Cargo.toml adds the new crate as a path dependency (<core-crate> = { path = "../core" }).
- Add
mod app; (empty) under src-tauri/src/.
- Update tooling that assumed
src-tauri/ was the cargo root:
src-tauri/.cargo/config.toml aliases (tauri-fmt, tauri-lint, tauri-test) extended to --workspace where appropriate, or relocated to a workspace-level config.
.github/workflows/ci.yml — fmt / clippy / test now run against the workspace.
- No code is moved. Existing modules under
src-tauri/src/ stay in place.
Out of Scope
Definition of Done
cargo build, cargo test --workspace, cargo clippy --workspace -- -D warnings succeed at the repo root.
- Adding
use tauri::Manager; anywhere under core/src/ fails to compile. Verified manually on a draft branch — no CI grep needed.
cargo tauri-fmt, cargo tauri-lint, cargo tauri-test continue to pass.
npm run lint, npm run test unchanged.
tauri dev / tauri build continue to work end-to-end on at least one host platform.
Parent
Part of #1402.
Goal
Convert the repo into a Cargo workspace and add a root-level
core/crate (Tauri-independent). Establishing the workspace boundary is what enforces "notauri::*undercore/" — at compile time, via the Cargo dependency graph, with no CI grep needed.This issue replaces #1403; see #1402 for the reasoning behind the switch from
src-tauri/src/core/to a workspace crate.Scope
Cargo.tomlat the repo root with memberscoreandsrc-tauri.core/crate at the repo root:core/Cargo.toml— does not listtaurias a dependency. Package name TBD in this PR (e.g.hwviz-coreto avoid shadowing the standardcorecrate).core/src/lib.rs— emptypub modplaceholders forcollector,persistence,monitoring,event_bus,settings,platform,infrastructure,models. No code is moved yet.src-tauri/Cargo.tomladds the new crate as a path dependency (<core-crate> = { path = "../core" }).mod app;(empty) undersrc-tauri/src/.src-tauri/was the cargo root:src-tauri/.cargo/config.tomlaliases (tauri-fmt,tauri-lint,tauri-test) extended to--workspacewhere appropriate, or relocated to a workspace-level config..github/workflows/ci.yml— fmt / clippy / test now run against the workspace.src-tauri/src/stay in place.Out of Scope
coreinto multiple sub-crates.bintarget for a future daemon (Non-Goal of Epic: split backend into Tauri-independent Core and thin App adapters #1402).Definition of Done
cargo build,cargo test --workspace,cargo clippy --workspace -- -D warningssucceed at the repo root.use tauri::Manager;anywhere undercore/src/fails to compile. Verified manually on a draft branch — no CI grep needed.cargo tauri-fmt,cargo tauri-lint,cargo tauri-testcontinue to pass.npm run lint,npm run testunchanged.tauri dev/tauri buildcontinue to work end-to-end on at least one host platform.