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
- feat(wasm): add bounded opaque blobs and exact-output file capability #17 — bounded opaque blobs and exact-output file capability
- feat(tauri): add a private async capture-only webview capability #18 — private async capture-only webview capability
- feat(tauri): add private native viewport-PNG capture adapters #19 — private native viewport-PNG capture adapters
Purpose
Build the actual #14 application proof: a Rust sketch compiled to one validated Wasm module drives a native Tauri webview exclusively through asynchronous generated kernal-api operations.
Scope
Add a feature-gated native example under examples/wasm-tauri-screenshot/ with a small Rust guest package beneath it. Package layout is private; do not create another public facade crate for the example.
The executable is:
kernal-api-wasm-tauri --url <http-or-https-url> --output <screenshot.png>
The native CLI parses and validates arguments, authorizes the URL and one exact output-file capability, builds/loads the actual Rust 1.95.0/Soldr guest module for #15's selected threaded target, validates imports/ABI before instantiation, and returns typed guest status.
Guest orchestration must use generated kernel ABI calls only:
open_webview(...).await?;
wait_until_loaded(...).await?;
clock_sleep(Duration::from_secs(5)).await?;
let snapshot = capture_visible_png(...).await?;
write_snapshot(snapshot, granted_output).await?;
close_webview(...).await?;The five-second wait starts after the matching top-level load-finished event and uses the kernel monotonic clock.
Non-goals
No native replacement for guest business logic, direct guest Tauri/WASI/filesystem/network/clock/platform imports, guest-created runtime, public backend/generated types, path string or whole PNG transfer through the ABI, or public example-only facade crate.
Implementation shape
native CLI
-> URL + exact OutputFile grant
-> validate and instantiate one actual Wasm module
-> generated async kernel ABI
-> private Tauri/blob/output adapters
Tauri work remains native/private; guest futures suspend/resume on completions through the single kernel runtime.
RED → GREEN acceptance criteria
- RED: add the focused real-runner test first and demonstrate it fails because the generated async webview/snapshot ABI is absent; retain the RED→GREEN evidence in PR history, not a permanently failing CI test.
- GREEN: Soldr/Rust 1.95.0 compiles one actual sketch module for feat(wasm): establish threaded sketch build, import validation, and lifecycle substrate #15's selected threaded target, and tests load that artifact rather than a native substitute.
- GREEN: validation rejects ambient WASI and direct Tauri, filesystem, network, clock, and platform imports before instantiation.
- GREEN:
kernal-api-wasm-tauri --url <fixture> --output <path>performs the real guest sequence open → matching load wait → five-second kernel-clock wait → capture → opaque write → close. - GREEN: trace records every guest step crossing generated async ABI boundaries and suspend/resume without blocking Tauri or creating another kernel runtime.
- GREEN: output reaches only feat(wasm): add bounded opaque blobs and exact-output file capability #17's exact granted file through bounded resource/I/O paths.
- GREEN: guest trap/cancellation returns typed failure and cleans up Tauri/window/blob/output resources.
Platform concerns
Guest module/import set is identical across hosts; only private native adapters vary. The example stays opt-in and does not affect no-default-feature users. All documented Rust commands use Soldr.
Deliverables
Runner, guest package, reproducible Soldr build/run instructions, import-policy assertions, structured ABI/event tracing, and a short operator-facing CLI/error README.
Activity
zackees commentedon Sep 14, 2026
Completed by PR #153 (merge fddd176). The feature-gated one-module Rust screenshot guest, exact-output CLI path, generated async operation sequence, admission checks, and operator documentation landed.