Skip to content

HarikrishnanBalagopal/test-wasm-components-handwritten

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README copied from WASM runtime host repo

Handwritten WASM components. The point is to learn the WASM component model https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md

Runtime host for running these components is in https://github.com/HarikrishnanBalagopal/test-wasm-components-handwritten-host

Overview

Based on this tutorial https://ifcoltransglinks.wordpress.com/2024/01/24/creating-a-webassembly-component-with-wat-and-wit/

Host for the manually written WASM component. The wit is generated from the addcomp.wat file in the manual folder.

$ wasm-tools component wit addcomp.wat
package root:component;

world root {
  export length: func(input: string) -> u32;
}

To produce the WASM component binary we use

$ wasm-tools parse addcomp.wat -o addcomp.wasm

About

Handwritten WASM components using wasm-tools (part of WASI preview 2)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published