api-client/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload
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
..
dist-js feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
examples/tauri-app feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
guest-js feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
permissions feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
src fix(desktop): disk space detection (#5019) 2025-04-25 16:57:37 +05:30
.envrc feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
.gitignore feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
build.rs feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
Cargo.lock fix(desktop): disk space detection (#5019) 2025-04-25 16:57:37 +05:30
Cargo.toml fix(desktop): disk space detection (#5019) 2025-04-25 16:57:37 +05:30
devenv.lock feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
devenv.nix feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
devenv.yaml feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
LICENSE.md feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
package.json feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
pnpm-lock.yaml feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
README.md feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
rollup.config.js feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30
tsconfig.json feat: platform independent core and the new desktop app (#4684) 2025-02-28 00:01:25 +05:30

Tauri Plugin: AppLoad

A Tauri plugin for downloading and loading web app bundles into WebView.

GitHub License MIT Tauri 2.0 Rust

Features

  • 🦀 Blazingly fast!
  • Download and load web app bundles from remote servers
  • Secure verification using ed25519 + blake3
  • Caching with hot/cold storage strategy
  • Custom URI scheme for isolated app loading

Installation

Important

This plugin requires Tauri 2.0 or later.

Add the plugin to your project by installing directly from GitHub:

[dependencies]
tauri-plugin-appload = { git = "https://github.com/CuriousCorrelation/tauri-plugin-appload" }
"dependencies": {
  "@CuriousCorrelation/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload"
}

Quick Start

Rust

fn main() {
    tauri::Builder::default()
        .plugin(tauri_plugin_appload::init())
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

JavaScript/TypeScript

import { download, load } from '@CuriousCorrelation/plugin-appload'

// Download a bundle
const { bundleName } = await download({
  serverUrl: "https://example.com"
})

// Load the bundle in a new window
await load({
  bundleName,
  window: {
    title: "My App",
    width: 800,
    height: 600
  }
})

Configuration

Note

The plugin uses sensible defaults but can be customized via configuration.

Option Description Default
api.serverUrl Bundle server URL http://localhost:3200
cache.maxSize Maximum cache size 100MB
cache.filesTtl File time-to-live 1 hour
storage.maxBundleSize Maximum bundle size 50MB

Permissions

The plugin defines the following permissions:

  • allow-download: Enable bundle downloads
  • allow-load: Enable bundle loading
  • deny-download: Disable bundle downloads
  • deny-load: Disable bundle loading

Development

Requirements:

  • Rust 1.77.2 or later
  • Node.js 18 or later
  • pnpm

License

Code: (c) 2024 - CuriousCorrelation

MIT or MIT/Apache 2.0 where applicable.