Skip to content

Latest commit

 

History

History

Example Components

Most (if not all) individual example projects are standard Javascript projects commonplace ecosystem tooling, whether for server side (NodeJS -- npm, etc) or the browser.

A brief description of the examples contained in this folder:

Example Component Description
add exports basic functionality with simple types with a bare function export (deprectaed)
adder exports basic functionality with simple types with an interface (recommended)
host-logging Showcases the use of the wasi:logging interface with a custom embedder ("host") function
http-hello-world HTTP server using the wasi:http/incoming-handler, the hard way.
http-server-fetch-handler HTTP server using standards-forward fetch() event handling built into StarlingMonkey
http-server-hono HTTP server using the standards-forward Hono framework
node-fetch Performs a HTTP request using fetch()
string-reverse-upper imports functionality to build more advanced computation to export
string-reverse exports basic functionality with a slightly more involved WIT interface and more complex types
typegen-async-export Showcases how to build that uses an async export, with types provided
ts-resource-export Showcases an embedder ("host") using a resource defined in a component ("guest")
ts-resource-import Showcases using a component ("guest") that imports a Resource defined by an embedder ("host")
webidl-book-library Showcases WebIDL support using webidl2wit