Hayride Runtime
Hayride is a runtime for building and executing modular WebAssembly components, which we call morphs. It leverages the WebAssembly Component Model and the WASI standard to ensure interoperability and portability across environments.

Hayride's primary focus is on supporting WASIp2, an evolution of the original WASI specification. WASIp2 introduces a richer and more composable interface for WebAssembly components, enabling Hayride to run morphs with greater flexibility, efficiency, and capability.
WebAssembly Runtime
Hayride is built on top of the Wasmtime WebAssembly runtime.
Wasmtime provides a fast and secure execution engine for WebAssembly modules. Hayride extends this by embedding a minimal set of custom host functions, exposed via the WebAssembly Interface Types (WIT) system, to support morph functionality while remaining interoperable with other WASI-compliant environments.
Host Function Philosophy
Hayride defines host functions through WIT interfaces, making them importable by morphs. These host functions enable powerful interactions such as networking, file I/O, and AI services.
However, Hayride intentionally limits the number of host functions in the runtime itself. Instead of coupling all logic to the host, we encourage developers to implement functionality as reusable morphs. This design promotes long-term portability and allows morphs to run in other WASI-compliant runtimes.
Ultimately, Hayride aims to minimize vendor lock-in by enabling morphs to be executed in any WebAssembly runtime that supports the Component Model and WASI.
All host functions are defined in our open Coven repository.
Runtime WIT
The Hayride runtime implements a collection of WIT world
s that compose various capabilities:
package hayride:runtime@0.0.1;
world hayride-server {
include hayride:wasip2/imports@0.0.60;
// exports
export wasi:http/incoming-handler@0.2.0;
export hayride:http/config@0.0.60;
}
world hayride-cli {
include hayride:wasip2/imports@0.0.60;
include hayride:wasip2/exports@0.0.60;
}
world hayride-ws {
export hayride:socket/websocket@0.0.60;
}
world hayride-ai {
include wasi:nn/ml@0.2.0-rc-2024-10-28;
import hayride:ai/tensor-stream@0.0.60;
import hayride:ai/inference-stream@0.0.60;
import hayride:ai/graph-stream@0.0.60;
import hayride:ai/agents@0.0.60;
import hayride:ai/model@0.0.60;
import hayride:ai/model-repository@0.0.60;
import hayride:ai/rag@0.0.60;
}
world hayride-core {
import hayride:core/version@0.0.60;
}
world hayride-api {
import hayride:core/types@0.0.60;
}
world hayride-silo {
import hayride:silo/threads@0.0.60;
import hayride:silo/process@0.0.60;
}
world hayride-wac {
import hayride:wac/wac@0.0.60;
}
Please refer to the interface documentation for more details on each set of interfaces usage.
Runtime Morphs
Hayride provides two primary morphs that are essential for its operation:
- Server Morph: The core component that handles incoming requests and manages the lifecycle of morphs.
- CLI Morph: The command-line interface that allows users to interact with the Hayride runtime, manage morphs, and perform various tasks.
As we continue to refine the cli and server, we plan to further expose their interfaces to allow for custom CLI and Server morphs to be created.