WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit eed4df7

Browse files
authored
Merge pull request #123 from ydnar/ydnar/changelog
CHANGELOG: initial changelog
2 parents 0eeef29 + 4d87808 commit eed4df7

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4+
5+
## [v0.1.0] — 2024-07-04
6+
7+
Initial version, supporting [TinyGo](https://tinygo.org/) + [WASI](https://wasi.dev) 0.2 (WASI Preview 2).
8+
9+
### Known Issues
10+
- [#95](https://github.com/ydnar/wasm-tools-go/issues/95): `variant` and `result` types without fully-packed `data` shape types will not correctly represent all associated types.
11+
- [#111](https://github.com/ydnar/wasm-tools-go/issues/111): `flags` types with > 32 labels are not correctly supported. See [component-model#370](https://github.com/WebAssembly/component-model/issues/370) and [wasm-tools#1635](https://github.com/bytecodealliance/wasm-tools/pull/1635) for more information.
12+
- [#118](https://github.com/ydnar/wasm-tools-go/issues/118): Canonial ABI [post-return](https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#canon-lift) functions to clean up allocations are not currently generated.
13+
- 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.
14+
- Support for mainline [Go](https://go.dev/).
15+
16+
[Unreleased]: <https://github.com/ydnar/wasm-tools-go/compare/v0.1.0...HEAD>
17+
[v0.1.0]: <https://github.com/ydnar/wasm-tools-go/tree/v0.1.0>

design/README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ This directory contains design notes and prototypes of Go bindings for Component
44

55
## Exports
66

7-
### Post-Return
8-
9-
For each exported function that returns allocated memory, there is a [post-return](https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#canon-lift) function called by the Canonical ABI machinery to allow the component to free the allocation(s).
10-
11-
The post-return function name is `cabi_post_` followed by the fully-qualified function name. For example, the WIT function `example:foo/bar#echo` returning a `string` would have a post-return function named `cabi_post_example:foo/bar#echo`.
12-
13-
The post-return function has the form of `(func (param flatten_functype($ft).results))`, where the arguments is a flattened representation of the function results.
14-
157
### Export Bindings for Resource Types
168

179
For each exported resource type, in addition to constructors, methods, and static functions, a component must import and export a number of functions to manage the resource lifecycle.
@@ -46,6 +38,16 @@ Similarly, a function is exported for each resource method (e.g. `drink` and `sp
4638
- Export: `example:foo/bar#[method]water.drink` (implemented by user code)
4739
- Export: `example:foo/bar#[method]water.spill` (implemented by user code)
4840

41+
### Post-Return
42+
43+
**Note: as of v0.1.0, this package does not support post-return functions.** See [#118](https://github.com/ydnar/wasm-tools-go/issues/118) for more information.
44+
45+
For each exported function that returns allocated memory, there is a [post-return](https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md#canon-lift) function called by the Canonical ABI machinery to allow the component to free the allocation(s).
46+
47+
The post-return function name is `cabi_post_` followed by the fully-qualified function name. For example, the WIT function `example:foo/bar#echo` returning a `string` would have a post-return function named `cabi_post_example:foo/bar#echo`.
48+
49+
The post-return function has the form of `(func (param flatten_functype($ft).results))`, where the arguments is a flattened representation of the function results.
50+
4951
### Example in Go
5052

5153
#### Generated Bindings

0 commit comments

Comments
 (0)