Skip to content

Commit

Permalink
doc: update README
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Sep 27, 2024
1 parent 93812a2 commit 662b6b0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# Description

`wadge` is a testing framework, which lets you test your WebAssembly applications natively and using all your existing development tools (e.g. debuggers).
`wadge` is WebAssembly bridge allowing native applications invoke Wasm functions, normally provided by a Wasm runtime.
Main use cases for this project are:
- Testing WebAssembly applications natively, using existing development tools (e.g. debuggers)
- Extending native applications with WebAssembly plugins

## Go

`wadge` provides `wadge-bindgen-go` utility, which walks the complete AST of your application and generates a binding file, which replaces functions with `wasmimport` directives, normally provided by the runtime, by a native implementation, which invokes those imports on a WebAssembly component (harness) running in an embedded Wasmtime instance. This lets you test you applications without changing implementation and achieving full test coverage.
`wadge` provides `wadge-bindgen-go` utility, which walks the complete AST of your application and generates a binding file, `bindings.wadge.go` by default.

The bindings file utilizes `//go:linkname` directives to replace unimplemented functions with `//go:wasmimport` directives, normally provided by the runtime,
using a native implementation, which invokes those imports on a WebAssembly component running in an embedded `wadge` instance.

For testing, Go library provides `RunTest` function, which plugs into the Go standard library `testing` framework.

# Design

`wadge` uses [`cabish`](https://github.com/wasmCloud/cabish) to read and write values over FFI to pass to embedded Wasmtime instance.
`wadge` uses [`cabish`](https://github.com/wasmCloud/cabish) to read and write values over FFI to pass to an embedded WebAssembly runtime ([Wasmtime](https://github.com/bytecodealliance/wasmtime)).

0 comments on commit 662b6b0

Please sign in to comment.