Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/wasi: update to [email protected] #4326

Merged
merged 3 commits into from
Jul 8, 2024

Conversation

ydnar
Copy link
Contributor

@ydnar ydnar commented Jul 5, 2024

This updates the "vendor" submodule of wasm-tools-go and regenerates the WASI 0.2 bindings with the most recent version of wit-bindgen-go. Full release notes on the changes:

v0.1.2 — 2024-07-05

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 — 2024-07-04

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.

@ydnar ydnar requested review from aykevl, dgryski and dkegel-fastly July 5, 2024 07:17
@ydnar ydnar self-assigned this Jul 5, 2024
@ydnar ydnar changed the title internal/wasi: update to [email protected] internal/wasi: update to [email protected] Jul 6, 2024
@dgryski
Copy link
Member

dgryski commented Jul 8, 2024

Do any of these changes require updates to the libc_wasip2 wrappers?

@ydnar
Copy link
Contributor Author

ydnar commented Jul 8, 2024

None AFAIK.

Copy link
Member

@dgryski dgryski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dgryski dgryski merged commit 2d85fc6 into tinygo-org:dev Jul 8, 2024
17 checks passed
@ydnar ydnar deleted the wasm-tools-go-updates branch July 8, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants