-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Roman Volosatovs <[email protected]>
- Loading branch information
1 parent
93812a2
commit 662b6b0
Showing
1 changed file
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)). |