V / vulcan documentation

Venus

Navigation and delivery

A useful application supports direct links, reloads and browser history. Venus provides a navigation state machine and a browser adapter to keep the view and address bar in agreement.

Configure the adapter

Place venus.navigation.json beside the application entry:

{ "mode": "history", "base": "/", "home": "/", "links": [] }

History mode uses ordinary paths. The static host must serve a document for those paths. This documentation site generates a document for every known page; an unknown path should receive the site's 404 document with HTTP status 404.

Fold navigation events

Use nav_init, nav_fold and nav_link from the Venus kit. Host navigation events arrive through the application's event fold. Serialize outgoing commands with nav_command_json, drain with nav_sent, and emit ui:navigate only for a nonempty successful command.

Do not emit a raw command record or an unhandled Result on that channel. The protocol expects JSON text.

Deliver the bundle

Serve .wasm as application/wasm and .mjs as a JavaScript media type. Deploy a complete version of the bundle together so an application image cannot accidentally load another release's runtime.

Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp enable SharedArrayBuffer transport. The browser runtime also has a postMessage fallback when cross-origin isolation is unavailable.

Verify what people use

Test direct links, refresh, Back and Forward, keyboard navigation, narrow screens and failed loads in a real browser. A successful compilation does not prove that routing, host bindings or rendering work in the deployed environment.