api-client/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/Cargo.toml
Shreyas 13b46d52f2
fix(desktop): disk space detection (#5019)
This fix replace `sys-info v0.9.1` with
the more actively maintained `sysinfo 0.34.2`
which does return size of the disk in bytes.

Closes #5017, HFE-831

Rebased on #5010, consider merging that first.

Issues:

Appload fails to load with a "Storage full" error despite
having sufficient disk space.

This was caused by a unit mismatch in the `sys-info` crate
which returns disk space in kilobytes instead of bytes.

- sys_info::disk_info() returns values in KB, see:
  60ecf1470a/c/linux.c (L119)
- The `StorageFull` error was triggered when comparing
  raw bytes against a KB value, causing false positive

Changes:
- Rewrite the `ensure_space` function to find the correct disk of the config dir
- Add a new `StorageError::DiskNotFound` for cases where the disk cannot
  be resolved
2025-04-25 16:57:37 +05:30

52 lines
1.5 KiB
TOML

[package]
name = "tauri-plugin-appload"
version = "0.1.0"
authors = [ "CuriousCorrelation" ]
description = "A Tauri plugin to download and load web app into WebView"
edition = "2021"
rust-version = "1.77.2"
exclude = ["/examples", "/webview-dist", "/webview-src", "/node_modules"]
links = "tauri-plugin-appload"
[dependencies]
tauri = { version = "2.0.6", features = ["unstable"] }
serde = "1.0"
serde_json = { version = "1", features = [] }
thiserror = { version = "2.0.3", features = [] }
url = { version = "2.5.3", features = ["serde"] }
reqwest = { version = "0.12.9", features = [] }
zip = { version = "2.2.0", features = [] }
tokio = { version = "1.41.1", features = [] }
mime-infer = { version = "3.0.0", features = [] }
regex = { version = "1.11.1", features = [] }
tracing = "0.1.41"
dashmap = { version = "6.1.0" }
flate2 = { version = "1.0.35" }
chrono = { version = "0.4.38", features = ["serde"] }
base64 = "0.22.1"
blake3 = { version = "1.5.4", features = ["serde"] }
ed25519-dalek = { version = "2.1.1", features = ["rand_core", "serde"] }
hex = "0.4.3"
lru = "0.12.5"
sysinfo = "0.34.2"
humantime-serde = "1.1.1"
futures = "0.3.31"
mime_guess = "2.0.5"
rayon = "1.10.0"
hex_color = "3.0.0"
[build-dependencies]
tauri-plugin = { version = "2.0.1", features = ["build"] }
[target.'cfg(target_os = "macos")'.dependencies]
cocoa = "0.26.0"
objc = "0.2.7"
rand = "0.8.5"
[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.58.0", features = [
"Win32_Graphics_Dwm",
"Win32_Foundation",
"Win32_UI_Controls",
] }
winver = "1.0.0"