Skip to content

Releases: bytecodealliance/go-modules

v0.1.5

23 Aug 22:13
dc4cac5
Compare
Choose a tag to compare

Added

  • wit-bindgen-go --version now reports the module version and git revision of the wit-bindgen-go command.

Changed

v0.1.4

16 Jul 19:47
fa5e4cb
Compare
Choose a tag to compare

Added

  • wit-bindgen-go generate now accepts a --cm option to specify the Go import path to package cm. Used for custom or internal implementations of package cm. Defaults to github.com/ydnar/wasm-tools-go/cm.
  • Tuple9...Tuple16 types in package cm to align with component-model#373. Tuples with 9 to 16 types will no longer generate inline struct types.
  • Documentation for Canonical ABI lift and lower helper functions in package cm.

Changed

  • Removed outdated documentation in design.

v0.1.3

08 Jul 17:33
49f7d92
Compare
Choose a tag to compare

Added

Fixed

  • #130: anonymous tuple types now correctly have exported Go struct fields.
  • #129: correctly handle zero-length tuple and record types, represented as struct{}.

v0.1.2

05 Jul 20:44
9753398
Compare
Choose a tag to compare

Added

  • Canonical ABI lifting code for flags and variant types.
  • Lifting code for result and variant will now panic if caller passes an invalid case.
  • Additional test coverage for variant and flags cases.

Removed

  • Package cm: Removed unused functions Reinterpret2, LowerResult, LowerBool, BoolToU64, S64ToF64.
  • Package cm: Removed unused experimental flags implementation behind a build tag.

Fixed

  • Lifting code for result with no error type will now correctly set IsErr.

v0.1.1

04 Jul 20:16
dcc0905
Compare
Choose a tag to compare

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 now cm.BoolResult.
  • Types cm.OKResult and cm.ErrResult have been removed, replaced with a more generalized cm.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 name TimeEOD.
  • OK is now a predefined initialism. For example, the WIT name state-ok would previously translate into the Go name StateOk instead of the idiomatic StateOK.

Fixed

  • #95: wit-bindgen-go now correctly generates packed data shape types for variant and result types.
  • Fixed swapped Shape and Align type parameters in the functions cm.New and cm.Case for manipulating variant types.
  • Variant validation now correctly reports variant instead of result in panic messages.

v0.1.0

04 Jul 09:15
eed4df7
Compare
Choose a tag to compare

Initial version, supporting TinyGo + WASI 0.2 (WASI Preview 2).

Known Issues

  • #95: variant and result types without fully-packed data 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 and result types may not be visible to the garbage collector and may be freed while still in use.
  • Support for mainline Go.