Documentation
¶
Overview ¶
Package wasmhv pkg/wasmhv/embed.go c3-vis-wasm
Package wasmhv pkg/wasmhv/vnet_fallback.go c3-vis-wasm
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AutoUpdateJS []byte
AutoUpdateJS is pkg/wasmhv/autoupdate.js — the self-update poller for the `hv serve` desk: it compares a /wasm-version fingerprint against the version the page booted with and reloads to a newer build (toast + opt-out). Injected ONLY by hv serve, so it never runs for a native-hosted hypervisor UI.
var BrowseBootstrapHTML []byte
Real-origin mesh browser, served on the isolated browse origin B (<id>.mesh.localhost) and the visor origin V.
The worker, the bridge protocol and the trust boundary come from github.com/0magnet/realorigin — realorigin.ServiceWorkerJS() and realorigin.ResponderJS(). Only two pieces stay here, and both are ours rather than the substrate's:
BrowseBootstrapHTML — B's navigation shell. The library ships a plain one;
this keeps skywire's, which shows the live route-setup
log while a mesh route is being built.
BrowseTransportJS — the transport realorigin calls: dmsg, skynet and
skysocks-lite through V's own first-party visor.
var BrowseJS = browseui.BrowseJS
BrowseJS is the desk bundle (bottle's jsfs + vnet + proc, the skywire seeding and exec glue, the Go-browser launcher) served as /browse.js beside every desk page.
Re-exported from the dependency-free browseui leaf package so pkg/visor can serve the SAME bundle in the native hypervisor UI without an import cycle.
var BrowseTransportJS []byte
var CtlBridgeJS []byte
CtlBridgeJS is pkg/wasmhv/ctl-bridge.js — the browser side of the ctlbridge control surface (pkg/wasmhv/ctlbridge). It connects the tab to /ctl/events over SSE so a shell can drive the in-tab wasm-visor. Injected ONLY when the harness control surface is enabled (the dev harness, or `hv serve --harness`), never on the public serving path.
var FaviconICO []byte
FaviconICO is the wasm-visor's browser-tab favicon: the Skywire mesh-cloud mark tinted violet, so a wasm-visor tab is distinct at a glance from a host-native hypervisor tab. Served at /favicon.ico by ServeWasm.
var PWAIcon192 []byte
PWAIcon192 / PWAIcon512 are the maskable install icons referenced by the manifest, served at /icon-192.png and /icon-512.png.
var PWAIcon512 []byte
var PWAManifest []byte
PWAManifest is pkg/wasmhv/manifest.webmanifest — the Web App Manifest that makes the `hv serve` page installable (name, icons, standalone display). Served at /manifest.webmanifest and linked from the injected <head>. Only meaningful for the served standalone (a service worker needs a real same-origin URL), so it is NOT used by the single-file generator.
var ServiceWorkerJS []byte
ServiceWorkerJS is pkg/wasmhv/sw.js — the PWA service worker: precaches the app shell and serves cache-first for content-hashed bundles / network-first for everything else (so autoupdate.js stays correct online, offline still launches).
var WalletConfigHTML = browseui.WalletConfigHTML
WalletConfigHTML is the single wallet-config page, served at wallet/config by the hypervisor and framed by the dashboard's wallet tab. Re-exported from the browseui leaf like BrowseJS.
var WasmExecJS []byte
WasmExecJS is Go's lib/wasm/wasm_exec.js — the loader every page serves beside the skywire command module and the netview module (pkg/tpviz/netview). It MUST match the Go toolchain that built both, the go.mod version. Refresh it from $(go env GOROOT)/lib/wasm/wasm_exec.js when the toolchain moves.
var WasmExecTinyGoJS []byte
WasmExecTinyGoJS is the loader for a module TinyGo built, served at /wasm_exec_tinygo.js where bottle looks for it. Empty means none is served.
Functions ¶
func DeskBootJS ¶
func DeskBootJS() []byte
DeskBootJS is the shared desk boot (skywireDeskBoot) behind the desk-first pages — the docs playground and `hv serve`'s /desk. Re-exported from the browseui leaf like BrowseJS.
func ExecWorkerJS ¶
func ExecWorkerJS() []byte
ExecWorkerJS is the worker bundle served beside the desk pages as /skywire-worker.js — the thread every skywire COMMAND runs on, so the visor's Go runtime is not the thing scheduling on the page's main thread. Re-exported from the browseui leaf like BrowseJS.
func ServeVNetFallback ¶ added in v1.3.100
func ServeVNetFallback(w http.ResponseWriter, _ *http.Request)
ServeVNetFallback serves vnetFallbackHTML for a /vnet/ path.
func ServiceWorkerFor ¶
ServiceWorkerFor renders sw.js for one serving context: build is the fingerprint that names the cache (a new build ships a byte-different worker, which is what makes the browser re-install it), precache the shell files installed up front — the rest is cached as it is fetched.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package browseui pkg/wasmhv/browseui/embed.go c3-vis-wasm Assembles the desk bundle from its promoted home — the OS layer (github.com/0magnet/bottle: jsfs + vnet + proc) — plus the skywire-specific pieces: seed-skywire.js (the package-install filesystem layout), skywire-exec.js (per-command execution of the skywire CLI wasm), and gobrowser-loader.js (the launcher for the netscrape Go browser, which is compiled into the one skywire module as globalThis.skywireBrowser).
|
Package browseui pkg/wasmhv/browseui/embed.go c3-vis-wasm Assembles the desk bundle from its promoted home — the OS layer (github.com/0magnet/bottle: jsfs + vnet + proc) — plus the skywire-specific pieces: seed-skywire.js (the package-install filesystem layout), skywire-exec.js (per-command execution of the skywire CLI wasm), and gobrowser-loader.js (the launcher for the netscrape Go browser, which is compiled into the one skywire module as globalThis.skywireBrowser). |
|
Package cabundle pkg/wasmhv/cabundle/cabundle.go c3-vis-wasm
|
Package cabundle pkg/wasmhv/cabundle/cabundle.go c3-vis-wasm |
|
Package ctlbridge pkg/wasmhv/ctlbridge/ctlbridge.go c3-vis-wasm
|
Package ctlbridge pkg/wasmhv/ctlbridge/ctlbridge.go c3-vis-wasm |
|
Package deskhost pkg/wasmhv/deskhost/browseorigin.go c3-vis-wasm Untagged on purpose, like sameorigin.go: pure string work with no syscall/js, so the rules it encodes — which URLs earn a real isolated origin, and what canonical string names the target — are pinned by tests that actually run in CI.
|
Package deskhost pkg/wasmhv/deskhost/browseorigin.go c3-vis-wasm Untagged on purpose, like sameorigin.go: pure string work with no syscall/js, so the rules it encodes — which URLs earn a real isolated origin, and what canonical string names the target — are pinned by tests that actually run in CI. |
|
Package execwasm pkg/wasmhv/execwasm/execwasm.go c3-wasm-embed
|
Package execwasm pkg/wasmhv/execwasm/execwasm.go c3-wasm-embed |