Guides in Wasm

This page outlines my current thinking on a **local-first architecture** for Hitchhiker Guides. The focus is on using **WebAssembly (WASM)** as the core, standards-based implementation layer across server, desktop, mobile, and web platforms.

> Local-First Architecture for Hitchhiker Guides

# Architectural Vision Our vision is to enable **multiple WASM-based components** to interact through the **wiki context**, which is currently provided by the `about-frame-plugin`. This lays the groundwork for a future architecture where WASM components can interact: - On the **server** (e.g., in WarpDrive) - Within **desktop/mobile apps** (e.g., in Tauri Guide) - Possibly even **in-browser**, depending on the runtime and permissions

# LiveCode Integration A further long-term consideration is ensuring compatibility with the existing **LiveCode-based implementation**, such that we can: - Leverage the LiveCode IDE for rapid prototyping, UI design, and reuse of existing libraries and UI elements. - Explore WikiScript as a literate programming language for authoring interactive wiki content.

This document begins to define the core components of the project, which together will form a Living Specification for Hitchhiker Guides. The key architectural components are: - Hitchhiker Components – modular WASM components written in a variety of languages - Guide Server – a local HTTPS server (e.g., WarpDrive) for processing and rendering guides - Tauri Guide – a cross-platform Tauri-based desktop/mobile application for viewing and interacting with guides The general aim is to define **small, reusable WASM components** that can interoperate with the wiki system and other components—whether authored in Rust, LiveCode, or any other WIT-compatible language.

# Benefits

- ✅ **Code Reuse** The same WASM binary can run in both server and app environments.

- ✅ **Consistent Output** Guides render identically whether served from a local server or displayed in a Tauri-based application.

- ✅ **Security & Sandboxing** Wasmtime provides a secure execution environment with strong isolation guarantees.

- ✅ **Language Flexibility** Components can be written in any language that supports the WIT (WebAssembly Interface Types) component model—such as Rust, AssemblyScript, LiveCode (via WASM export), and more.

# See

- Discussion and research in chatgpt