Releases: bytecodealliance/go-modules
Releases · bytecodealliance/go-modules
v0.1.5
Added
wit-bindgen-go --version
now reports the module version and git revision of thewit-bindgen-go
command.
Changed
- Omit the default
//go:build !wasip1
build tags from generated Go files. This enableswit-bindgen-go
to targetGOOS=wasip1
(fixes #147). - Package
wit
now serializes multi-package WIT files with an un-nested “root” package. See WebAssembly/component-model#380 and bytecodealliance/wasm-tools#1700.
v0.1.4
Added
wit-bindgen-go generate
now accepts a--cm
option to specify the Go import path to packagecm
. Used for custom or internal implementations of packagecm
. Defaults togithub.com/ydnar/wasm-tools-go/cm
.Tuple9
...Tuple16
types in packagecm
to align with component-model#373. Tuples with 9 to 16 types will no longer generate inlinestruct
types.- Documentation for Canonical ABI lift and lower helper functions in package
cm
.
Changed
- Removed outdated documentation in design.
v0.1.3
v0.1.2
Added
- Canonical ABI lifting code for
flags
andvariant
types. - Lifting code for
result
andvariant
will now panic if caller passes an invalid case. - Additional test coverage for
variant
andflags
cases.
Removed
- Package
cm
: Removed unused functionsReinterpret2
,LowerResult
,LowerBool
,BoolToU64
,S64ToF64
. - Package
cm
: Removed unused experimentalflags
implementation behind a build tag.
Fixed
- Lifting code for
result
with no error type will now correctly setIsErr
.
v0.1.1
This release changes the memory layout of variant
and result
types to permit passing these types on the stack safely. This required breaking changes to package cm
, detailed below, as well as slightly more verbose type signatures for WIT functions that return a typed result
.
Breaking Changes
- Type
cm.Result
is nowcm.BoolResult
. - Types
cm.OKResult
andcm.ErrResult
have been removed, replaced with a more generalizedcm.Result[Shape, OK, Err]
type.
Added
- WIT labels with uppercase acronyms or initialisms are now preserved in Go form. For example, the WIT name
time-EOD
will result in the Go nameTimeEOD
. OK
is now a predefined initialism. For example, the WIT namestate-ok
would previously translate into the Go nameStateOk
instead of the idiomaticStateOK
.
Fixed
- #95:
wit-bindgen-go
now correctly generates packeddata
shape types forvariant
andresult
types. - Fixed swapped
Shape
andAlign
type parameters in the functionscm.New
andcm.Case
for manipulatingvariant
types. - Variant validation now correctly reports
variant
instead ofresult
in panic messages.
v0.1.0
Initial version, supporting TinyGo + WASI 0.2 (WASI Preview 2).
Known Issues
- #95:
variant
andresult
types without fully-packeddata
shape types will not correctly represent all associated types. - #111:
flags
types with > 32 labels are not correctly supported. See component-model#370 and wasm-tools#1635 for more information. - #118: Canonial ABI post-return functions to clean up allocations are not currently generated.
- Because Go does not have a native tagged union type, pointers represented in
variant
andresult
types may not be visible to the garbage collector and may be freed while still in use. - Support for mainline Go.