Hitchhiker Components

This document specifies a modular system of WebAssembly components used across two Rust-based environments:

- WarpDrive — a localhost HTTPS server for fetching and processing federated wiki JSON content. - Tauri Guide — a standalone Tauri-based GUI app that renders Hitchhiker Guide experiences like e-books or interactive content.

Each module, called a Hitchhiker Component, is compiled to WebAssembly and follows a shared interface defined using WIT (WebAssembly Interface Types). The components accept JSON input, perform logic (such as filtering, transformation, or rendering), and return structured HTML or guide markup.

# Component Interface: WIT Definition

Each component must export this `guide` interface, allowing both WarpDrive and Tauri Guide to: * Call `process` to transform JSON into displayable output (e.g. HTML or markdown). * Use `get-title` and `get-description` for indexing or display menus.

Here is an example wit definition:

package hitchhiker:component interface guide { /// Accepts a JSON string representing a federated wiki page or collection. process: func(json_input: string) -> string /// Optional metadata about the component. get-title: func() -> string get-description: func() -> string }