mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-21 22:15:40 +00:00
refactor: introduce cargo workspace + psysonic-core crate (M1/7)
First milestone of the workspace crate split. Sets up the workspace
skeleton and extracts shared logging + cross-crate port traits into a
new psysonic-core crate.
src-tauri/Cargo.toml now defines [workspace]; top package
becomes the workspace root.
crates/psysonic-core/ new lib crate, no Tauri-handler code:
src/logging.rs full logging facade (was src/logging.rs)
src/ports.rs PlaybackQuery + AnalysisOrchestrator
trait declarations (no impls yet)
The top crate re-exports `psysonic_core::logging` and the
`app_eprintln!` / `app_deprintln!` macros so every existing
`crate::logging::*` and `crate::app_eprintln!` callsite keeps working
unchanged.
Port traits intentionally take `tauri::AppHandle` — psysonic-core is a
workspace-internal crate, so depending on Tauri here is a feature, not
a leak. Implementers will register themselves as
`Arc<dyn PlaybackQuery>` / `Arc<dyn AnalysisOrchestrator>` Tauri State
in M2/M3.
Behaviour preserving. Cargo check + clippy --workspace clean.
This commit is contained in:
@@ -6,8 +6,10 @@ mod analysis_cache;
|
||||
mod analysis_runtime;
|
||||
pub mod cli;
|
||||
mod discord;
|
||||
pub(crate) mod logging;
|
||||
mod lib_commands;
|
||||
|
||||
pub use psysonic_core::logging;
|
||||
pub use psysonic_core::{app_eprintln, app_deprintln};
|
||||
#[cfg(target_os = "windows")]
|
||||
mod taskbar_win;
|
||||
mod tray_runtime;
|
||||
|
||||
Reference in New Issue
Block a user