Skip to content

v0.3.0

Compare
Choose a tag to compare
@github-actions github-actions released this 11 Oct 21:34
· 216 commits to main since this release
213610c

Added

  • Go type aliases are now generated for each WIT type alias (type foo = bar). Deep chains of type aliases (type b = a; type c = b;) are fully supported. Generated documentation now reflects whether a type is an alias. Fixes #204.
  • go:wasmimport and go:wasmexport functions are now generated in a separate .wasm.go file. This helps enable testing or use of generated packages outside of WebAssembly.
  • wit-bindgen-go generate now generates a WIT file for each WIT world in its corresponding Go package directory. For example the wasi:http/proxy world would generate wasi/http/proxy/proxy.wit.
  • wit-bindgen-go wit now accepts a --world argument in the form of imports, wasi:clocks/imports, or wasi:clocks/[email protected]. This filters the serialized WIT to a specific world and interfaces it references. This can be used to generate focused WIT for a specific world with a minimal set of dependencies.

Changed

  • Method wit.(*Package).WIT() now interprets the non-empty string name argument as signal to render in single-file, multi-package braced form.
  • wit.(*Resolve).WIT() and wit.(*Package).WIT() now accept a *wit.World as context to filter serialized WIT to a specific world.
  • Packages are now sorted topologically by dependency in generated WIT files. For example, wasi:cli would be followed by its dependencies like wasi:io, wasi:filesystem, or wasi:random.