diff --git a/README.md b/README.md index e4a30cb..7785d30 100644 --- a/README.md +++ b/README.md @@ -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)).