Tauri

Builtin bundles

Install builtin .wvb bundles into a Tauri app at build time with wvb builtin and ship them as Tauri resources.

Ship one or more .wvb bundles inside your Tauri app so the webview loads offline, before any over-the-air update. Install them at build time with wvb builtin, then ship the directory as a Tauri resource.

Install bundles at build time

wvb builtin writes a manifest.json plus one <name>/<name>_<version>.wvb file per bundle into --out. Point it at the directory you ship as a resource:

wvb builtin --out src-tauri/bundles

The source is chosen by builtin.target in your config — a remote target downloads from an endpoint, a local target packs bundles from your workspaces. See the wvb builtin reference for every flag.

Ship the directory as a resource

List the bundles directory under bundle.resources so Tauri packs it into the app:

src-tauri/tauri.conf.json
{
  "bundle": {
    "resources": ["bundles/**/*"]
  }
}

Where bundles resolve at runtime

By default the plugin serves builtin bundles from a bundles directory in the app's resource directory. Override the location on the Source:

src-tauri/src/lib.rs
use wvb_tauri::Source;

// Static path, resolved through Tauri's path API.
Source::new().builtin_dir("$RESOURCE/bundles");

// Or compute it from the AppHandle.
Source::new().builtin_dir_fn(|app| Ok(app.path().resource_dir()?.join("bundles")));

On Android, builtin bundles ship inside the APK as asset:// resources that the filesystem cannot read directly. The plugin extracts them from the APK on first request, so the app must also register tauri_plugin_fs::init(). See Tauri mobile.

On this page