Repository navigation
Description
Parent: #14
Dependencies
- feat(wasm): establish threaded sketch build, import validation, and lifecycle substrate #15 — threaded sketch build, import validation, and lifecycle substrate
- feat(wasm): add generated async kernel ABI and generation-safe resources #16 — generated async kernel ABI and generation-safe resources
Purpose
Add the native, opt-in Tauri capability a Wasm sketch will use to open an untrusted URL, await its top-level load, and close its webview. This must not invent a temporary guest ABI or bypass the kernel runtime.
Scope
- Add exact-pinned Tauri 2.11.5 behind an explicit heavyweight feature.
default = []must not resolve Tauri, Wry, platform webviews, or a Wasm engine. - Add facade-owned semantic operations equivalent to
open_webview,wait_until_loaded, andclose_webview, with private backend types. - Dispatch create, navigate, load observation, and close on Tauri's event-loop/main thread. Native callbacks resolve kernel-owned async completions without blocking the event loop or creating another Tokio/kernel runtime.
- Complete the load future only for the requested top-level navigation's
PageLoadEvent::Finished. - Use typed errors for invalid URL, rejected navigation, timeout, cancellation, user/window close, and host failure.
- Authorize only valid
http:/https:URLs (including loopback HTTP for tests); reject malformed,file:,data:, custom schemes, popups/new windows, and redirects to prohibited schemes before effects. - Treat loaded content as untrusted: no Tauri commands/plugins, IPC initialization, capability files, filesystem access, guest bridge, or output capability.
- Use feat(wasm): add generated async kernel ABI and generation-safe resources #16 generation-safe instance-scoped handles.
Non-goals
No screenshot implementation (the next child issue), public Tauri/Wry/platform types, Tauri in Wasm, WebDriver/browser automation, JavaScript capture, desktop capture, mock guest runtime, or temporary host-to-guest API.
Implementation shape
generated kernel request
-> kernel-owned async operation
-> Tauri main-thread dispatch
-> WebviewWindowBuilder / on_page_load
-> callback resolves operation
-> guest future resumes
A concrete private module may be added under src/wasm/tauri/. Native-only tests may exercise the same kernel operation path until #16's ABI is connected.
RED → GREEN acceptance criteria
- RED: a focused checked-in test demonstrates the current facade cannot asynchronously open, await, and close a real Tauri external page.
- GREEN: exact-pinned Tauri is opt-in;
soldr cargo test --locked --no-default-featuresdoes not resolve or compile Tauri/Wry. - GREEN: a real webview opens an allowed loopback URL, observes only its matching top-level finished load, then closes and releases native resources.
- GREEN: public facade types are semantic; no Tauri, Wry, Tokio, or native platform type leaks.
- GREEN: validation rejects disallowed schemes before window creation and popup/prohibited redirects yield typed errors.
- GREEN: tracing proves UI operations use Tauri's event-loop thread, await without blocking it, and reuse the one kernel runtime.
- GREEN: timeout, cancellation, or window close wakes waiters, revokes handles, and leaks no window or resource.
Platform concerns
Main-thread affinity remains private and differs by platform. Linux later requires WebKitGTK 4.1 and a display (xvfb in CI). The visible/rendered window is intentional; kernal-api remains headless by default.
Deliverables
Feature-gated private navigation implementation, exact dependency pins, focused tests, and a developer note covering external-content isolation and PageLoadEvent::Finished correlation.
Activity
zackees commentedon Sep 12, 2026
Reopening: PR #148 delivered prerequisite generated-ABI work only. Its former description accidentally contained a GitHub closing-keyword sequence inside a negated sentence. The native webview acceptance criteria remain incomplete; the isolation probe currently detects upstream Wry IPC initialization. No compliant native backend has been merged.