curiouscorrelation 2d83f1e9ba fix(desktop): enforce one version per instance | 1 week ago | |
---|---|---|
.. | ||
dist-js | 1 week ago | |
examples | 1 week ago | |
guest-js | 1 week ago | |
permissions | 1 week ago | |
src | 1 week ago | |
.envrc | 1 week ago | |
.gitignore | 1 week ago | |
Cargo.lock | 1 week ago | |
Cargo.toml | 1 week ago | |
LICENSE.md | 1 week ago | |
README.md | 1 week ago | |
build.rs | 1 week ago | |
devenv.lock | 1 week ago | |
devenv.nix | 1 week ago | |
devenv.yaml | 1 week ago | |
package.json | 1 week ago | |
pnpm-lock.yaml | 1 week ago | |
rollup.config.js | 1 week ago | |
tsconfig.json | 1 week ago |
A Tauri plugin for downloading and loading web app bundles into WebView.
ed25519
+ blake3
[!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"
}
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_appload::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
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
}
})
[!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 |
The plugin defines the following permissions:
allow-download
: Enable bundle downloadsallow-load
: Enable bundle loadingdeny-download
: Disable bundle downloadsdeny-load
: Disable bundle loadingRequirements:
Code: (c) 2024 - CuriousCorrelation
MIT or MIT/Apache 2.0 where applicable.