https://github.com/mytechnotalent/warp
WARP (WebAssembly Application Runtime using Packages) is a Rust-first toolkit for building modular WebAssembly components with WIT and cargo component. It enables fast, portable development of composable WASM apps.
https://github.com/mytechnotalent/warp
abi application-binary-interface component components rust wasm wasm-bindgen wasmtime web webassembly webassembly-component webassembly-component-model webassembly-components webassembly-demo webassembly-lang webassembly-runtime webassembly-tutorial wit
Last synced: 7 months ago
JSON representation
WARP (WebAssembly Application Runtime using Packages) is a Rust-first toolkit for building modular WebAssembly components with WIT and cargo component. It enables fast, portable development of composable WASM apps.
- Host: GitHub
- URL: https://github.com/mytechnotalent/warp
- Owner: mytechnotalent
- License: apache-2.0
- Created: 2025-05-26T20:10:19.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-05-26T20:26:17.000Z (10 months ago)
- Last Synced: 2025-05-26T21:25:04.913Z (10 months ago)
- Topics: abi, application-binary-interface, component, components, rust, wasm, wasm-bindgen, wasmtime, web, webassembly, webassembly-component, webassembly-component-model, webassembly-components, webassembly-demo, webassembly-lang, webassembly-runtime, webassembly-tutorial, wit
- Language: Rust
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WARP
WARP (WebAssembly Application Runtime using Packages) is a Rust-first toolkit for building modular WebAssembly components with WIT and cargo component. It enables fast, portable development of composable WASM apps.
## Purpose
WARP empowers developers to build portable, composable WebAssembly applications by leveraging the Component Model, WIT interfaces, and Rust as a first-class implementation language. The goal is to simplify the creation of modular Wasm components that communicate through clearly defined interfaces—eliminating the need for unsafe pointer manipulation or runtime glue.
At the core of WARP is the idea that components should be reusable, language-agnostic units of logic. Each component defines and/or consumes interfaces using WIT (WebAssembly Interface Types), which describe functions, records, enums, and resources in a language-neutral format. These interfaces are grouped into worlds, which represent a complete set of expected imports and exports for a component. Projects are organized into packages, which are versioned collections of WIT definitions and implementations.
WARP streamlines the development process using cargo component for scaffolding, binding generation, and building, and wasmtime for running and composing components. By following the WARP structure, developers can create scalable applications with strong interface contracts and the flexibility to mix and match components from different packages, languages, or runtimes—all with Rust at the helm.
## Install
```bash
./scaffold-component.sh
```
## Code `src/lib.rs`
```rust
#[allow(warnings)]
mod bindings;
use bindings::Guest;
struct Component;
impl Guest for Component {
/// Say hello!
fn hello_world() -> String {
"Hello, World!".to_string()
}
}
bindings::export!(Component with_types_in bindings);
```
## Code `wit/world.wit`
```
package component:hello-world;
/// An example world for the component to target.
world example {
export hello-world: func() -> string;
}
```
## License
[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)