Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 30 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 11 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,51 +1,50 @@
[package]
name = "MirrorSphere"
version = "0.0.9"
version = "1.0.0-Alpha1"
edition = "2024"
build = "build.rs"
authors = ["DaLaw2"]

[dependencies]
async-trait = "0.1.88"
async-trait = "0.1.89"
bincode = { version = "2.0.1", features = ["serde"] }
blake2 = "0.10.6"
blake3 = { version = "1.8.2", features = ["traits-preview"] }
chrono = { version = "0.4.41", features = ["serde"] }
crossbeam-queue = "0.3.11"
crossbeam-queue = "0.3.12"
dashmap = "6.1.0"
digest = "0.10.7"
eframe = "0.32.0"
egui-file-dialog = "0.11.0"
fs4 = { version = "0.13.1", features = ["sync", "tokio"] }
font-kit = "0.14.3"
futures = "0.3.31"
image = "0.25.6"
libc = "0.2.169"
libc = "0.2.174"
log-panics = { version = "2.1.0", features = ["with-backtrace"] }
macros = { path = "macros" }
md-5 = "0.10.6"
memmap2 = "0.9.5"
memmap2 = "0.9.8"
privilege = "0.3.0"
rust-embed = "8.7.2"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
sha2 = "0.10.8"
serde_json = "1.0.143"
sha2 = "0.10.9"
sha3 = "0.10.8"
sqlx = { version = "0.8.6", features = ["runtime-tokio", "sqlite", "uuid", "derive", "chrono"] }
thiserror = "2.0.12"
thiserror = "2.0.16"
tokio-stream = "0.1.17"
tokio = { version = "1.45.1", features = ["full"] }
tokio = { version = "1.47.1", features = ["full"] }
toml = "0.9.4"
tracing = "0.1.41"
tracing-appender = "0.2.3"
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
uuid = { version = "1.17.0", features = ["v4", "fast-rng", "serde"] }
uuid = { version = "1.18.0", features = ["v4", "fast-rng", "serde"] }

[target.'cfg(windows)'.dependencies.windows-acl]
version = "0.3.0"

[target.'cfg(windows)'.dependencies.windows]
version = "0.61.1"
version = "0.61.3"
features = [
"Win32", "Win32_System", "Win32_System_Memory", "Win32_System_IO", "Win32_System_Threading", "Win32_System_Time",
"Win32_System_Registry", "Win32_System_Com", "Win32_Security", "Win32_Security_Authorization", "Win32_Storage",
Expand Down
1 change: 1 addition & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ ui_refresh_time = 2
default_wakeup_time = 10
max_concurrency = 16
max_file_operations = 100
channel_capacity = 100
4 changes: 3 additions & 1 deletion src/core/backup/backup_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use tokio::sync::oneshot;
use tokio::task::JoinHandle;
use tracing::error;
use uuid::Uuid;
use crate::model::core::gui::communication::ExecutionErrors;
use crate::model::core::gui::communication::{ExecutionErrors, ExecutionProgress, FolderProcess};

pub struct BackupEngine {
app_config: Arc<AppConfig>,
Expand Down Expand Up @@ -56,6 +56,8 @@ impl BackupEngine {
.with_service(self)
.command::<BackupCommand>()
.query::<BackupQuery>()
.event::<FolderProcess>()
.event::<ExecutionProgress>()
.event::<ExecutionErrors>()
.build();
}
Expand Down
6 changes: 6 additions & 0 deletions src/core/infrastructure/communication_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ impl CommunicationManager {
.ok_or(MiscError::TypeNotRegistered)?;
broadcaster.broadcast_event(Box::new(event))
}

pub fn clear_handlers(&self) {
self.command_handlers.clear();
self.query_handlers.clear();
self.event_broadcasters.clear();
}
}

pub struct ServiceRegistrar<S> {
Expand Down
5 changes: 5 additions & 0 deletions src/core/infrastructure/database_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ impl DatabaseManager {
self.pool.clone()
}

pub async fn shutdown(&self) {
self.pool.close().await;
self._lock.release();
}

pub async fn exist_database() -> bool {
fs::metadata(DATABASE_PATH).await.is_ok()
}
Expand Down
10 changes: 4 additions & 6 deletions src/core/infrastructure/io_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ impl IOManager {
file_system: FileSystem::new(semaphore),
}
}

pub fn shutdown(&self) {
self.file_system.semaphore().close();
}
}

impl Deref for IOManager {
Expand All @@ -26,9 +30,3 @@ impl Deref for IOManager {
&self.file_system
}
}

impl Drop for IOManager {
fn drop(&mut self) {
self.file_system.semaphore().close();
}
}
Loading