thedigitaloctopus / spin-componentize

Spin module->component converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spin-componentize

This library converts a Spin module to a component.

See reactor.wit for the definition of the Spin world. Note that although the world specifies both inbound-redis and inbound-http exports, spin-componentize will only export either or both according to what the original module exported.

Building

First, install Rust v1.68 or later. You'll also need to install a couple of Wasm targets:

rustup target add wasm32-wasi
rustup target add wasm32-unknown-unknown

Then run cargo build --release. Note that this is currently only a library and does not yet have a CLI interface, although that would be easy to add if desired.

Testing

To test whether the spin componentize process produces wasm components that can be used with wasmtime, we run "abi conformance" testing. These tests are run with a plain cargo test invocation.

Wit and Adapters

spin-componentize and the abi conformance tests use custom wit definitions and component adapters built from wasmtime.

See the adapters README and wit README for more information.

About

Spin module->component converter


Languages

Language:Rust 98.7%Language:Go 1.2%Language:Makefile 0.2%