Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.35 KB

README.md

File metadata and controls

50 lines (36 loc) · 1.35 KB

WEPL

The WebAssembly Component repl.

Building from Source

You can build wepl from source by running make build

Installing wepl

You can install wepl on your local system by running make install

Example

$ wepl mycomponent.wasm
> .exports
uppercase: func(input: string) -> string
> uppercase
uppercase: func(input: string) -> string
> s = "hello"
s: string
> uppercase(s)
"HELLO"

Built-in Functions

Built-in functions can be called by using the . prefix.

Supported functions include:

  • .imports: print a list of all the component's imports
  • .exports: print a list of all the component's exports
  • .link $function $wasm: satisfy the imported function $func with an export from the wasm component $wasm
  • .compose $adapter: satisfy imports with the supplied adapter module (e.g., to compose with WASI-Virt adapter)
  • .type $type: inspect a type's $type definition in scope
  • .help: print help information (? is alias for this built-in)

Features

  • Exported function evaluation
  • Listing imports and exports
  • Variable assignment
  • Type checking
  • Satisfying imports with other WebAssembly Components
  • Basic component composition

Compatibility

wepl is currently tied to the wasmtime 17 release. Components that work with that release should work in wepl.