You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+33-34Lines changed: 33 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -11,17 +11,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
11
11
12
12
### Fixed
13
13
14
-
-[#215](https://github.com/bytecodealliance/wasm-tools-go/issues/215): generate variant accessor methods with the correct scope for Go names.
14
+
-[#215](https://github.com/bytecodealliance/go-modules/issues/215): generate variant accessor methods with the correct scope for Go names.
15
15
16
16
### New Contributors
17
17
18
-
-[@vados-cosmonic](https://github.com/vados-cosmonic): [#212](https://github.com/bytecodealliance/wasm-tools-go/issues/212) and [#214](https://github.com/bytecodealliance/wasm-tools-go/pull/214) — verbose logging controls in `wit-bindgen-go`.
18
+
-[@vados-cosmonic](https://github.com/vados-cosmonic): [#212](https://github.com/bytecodealliance/go-modules/issues/212) and [#214](https://github.com/bytecodealliance/go-modules/pull/214) — verbose logging controls in `wit-bindgen-go`.
19
19
20
20
## [v0.3.0] — 2024-10-11
21
21
22
22
### Added
23
23
24
-
- Go [type aliases](https://go.dev/ref/spec#Alias_declarations) 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](https://github.com/bytecodealliance/wasm-tools-go/issues/204).
24
+
- Go [type aliases](https://go.dev/ref/spec#Alias_declarations) 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](https://github.com/bytecodealliance/go-modules/issues/204).
25
25
-`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.
26
26
-`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`.
27
27
-`wit-bindgen-go wit` now accepts a `--world` argument in the form of `imports`, `wasi:clocks/imports`, or `wasi:clocks/imports@0.2.0`. 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.
@@ -69,18 +69,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
69
69
### Added
70
70
71
71
- Generated structs and structs in package `cm` now include a [`HostLayout` field](https://github.com/golang/go/issues/66408) in order to conform with the [relaxed types proposal](https://github.com/golang/go/issues/66984) for `GOARCH=wasm32`. The `cm.HostLayout` type is an alias for `structs.HostLayout` on Go 1.23 or later, and a polyfill for Go 1.22 or earlier.
72
-
-[#163](https://github.com/bytecodealliance/wasm-tools-go/issues/163): added `cm.F32ToU64()` and `cm.U64ToF32()` for flattening `f32` and `u64` types in the Canonical ABI.
72
+
-[#163](https://github.com/bytecodealliance/go-modules/issues/163): added `cm.F32ToU64()` and `cm.U64ToF32()` for flattening `f32` and `u64` types in the Canonical ABI.
73
73
- Test data from [bytecodealliance/wit-bindgen/tests/codegen](https://github.com/bytecodealliance/wit-bindgen/tree/main/tests/codegen).
74
74
75
75
### Fixed
76
76
77
-
-[#159](https://github.com/bytecodealliance/wasm-tools-go/pull/159): correctly escape all WIT keywords, including when used in package names.
78
-
-[#160](https://github.com/bytecodealliance/wasm-tools-go/issues/160): fixed the use of Go reserved keywords in function returns as result types.
79
-
-[#161](https://github.com/bytecodealliance/wasm-tools-go/issues/161): correctly handle `constructor` as a WIT keyword in wit.
80
-
-[#165](https://github.com/bytecodealliance/wasm-tools-go/issues/165): fixed use of imported types in exported functions.
81
-
-[#167](https://github.com/bytecodealliance/wasm-tools-go/issues/167): fixed a logic flaw in `TestHasBorrow`.
82
-
-[#170](https://github.com/bytecodealliance/wasm-tools-go/issues/170): resolve implied names for interface imports and exports in a world.
83
-
-[#175](https://github.com/bytecodealliance/wasm-tools-go/issues/175): generated correct symbol names for imported and exported functions in worlds (`$root`) or interfaces declared inline in worlds.
77
+
-[#159](https://github.com/bytecodealliance/go-modules/pull/159): correctly escape all WIT keywords, including when used in package names.
78
+
-[#160](https://github.com/bytecodealliance/go-modules/issues/160): fixed the use of Go reserved keywords in function returns as result types.
79
+
-[#161](https://github.com/bytecodealliance/go-modules/issues/161): correctly handle `constructor` as a WIT keyword in wit.
80
+
-[#165](https://github.com/bytecodealliance/go-modules/issues/165): fixed use of imported types in exported functions.
81
+
-[#167](https://github.com/bytecodealliance/go-modules/issues/167): fixed a logic flaw in `TestHasBorrow`.
82
+
-[#170](https://github.com/bytecodealliance/go-modules/issues/170): resolve implied names for interface imports and exports in a world.
83
+
-[#175](https://github.com/bytecodealliance/go-modules/issues/175): generated correct symbol names for imported and exported functions in worlds (`$root`) or interfaces declared inline in worlds.
84
84
85
85
## [v0.2.0] — 2024-09-05
86
86
@@ -95,7 +95,7 @@ Going forward, please update your Go imports from `github.com/ydnar/wasm-tools-g
95
95
96
96
### Fixed
97
97
98
-
-[#151](https://github.com/bytecodealliance/wasm-tools-go/issues/151): backport support for JSON generated by `wasm-tools` prior to v1.209.0, which added `@since` and `@unstable` feature gates.
98
+
-[#151](https://github.com/bytecodealliance/go-modules/issues/151): backport support for JSON generated by `wasm-tools` prior to v1.209.0, which added `@since` and `@unstable` feature gates.
99
99
100
100
## [v0.1.5] — 2024-08-23
101
101
@@ -105,7 +105,7 @@ Going forward, please update your Go imports from `github.com/ydnar/wasm-tools-g
105
105
106
106
### Changed
107
107
108
-
- Omit the default `//go:build !wasip1` build tags from generated Go files. This enables `wit-bindgen-go` to target `GOOS=wasip1` (fixes [#147](https://github.com/bytecodealliance/wasm-tools-go/issues/147)).
108
+
- Omit the default `//go:build !wasip1` build tags from generated Go files. This enables `wit-bindgen-go` to target `GOOS=wasip1` (fixes [#147](https://github.com/bytecodealliance/go-modules/issues/147)).
109
109
- Package `wit` now serializes multi-package WIT files with an un-nested “root” package. See [WebAssembly/component-model#380](https://github.com/WebAssembly/component-model/pull/380) and [bytecodealliance/wasm-tools#1700](https://github.com/bytecodealliance/wasm-tools/pull/1700).
110
110
111
111
## [v0.1.4] — 2024-07-16
@@ -124,12 +124,12 @@ Going forward, please update your Go imports from `github.com/ydnar/wasm-tools-g
124
124
125
125
### Added
126
126
127
-
-[#128](https://github.com/bytecodealliance/wasm-tools-go/pull/128): implemented `String` method for `enum` types ([@rajatjindal](https://github.com/rajatjindal)).
127
+
-[#128](https://github.com/bytecodealliance/go-modules/pull/128): implemented `String` method for `enum` types ([@rajatjindal](https://github.com/rajatjindal)).
128
128
129
129
### Fixed
130
130
131
-
-[#130](https://github.com/bytecodealliance/wasm-tools-go/issues/130): anonymous `tuple` types now correctly have exported Go struct fields.
132
-
-[#129](https://github.com/bytecodealliance/wasm-tools-go/issues/129): correctly handle zero-length `tuple` and `record` types, represented as `struct{}`.
131
+
-[#130](https://github.com/bytecodealliance/go-modules/issues/130): anonymous `tuple` types now correctly have exported Go struct fields.
132
+
-[#129](https://github.com/bytecodealliance/go-modules/issues/129): correctly handle zero-length `tuple` and `record` types, represented as `struct{}`.
133
133
134
134
## [v0.1.2] — 2024-07-05
135
135
@@ -164,7 +164,7 @@ This release changes the memory layout of `variant` and `result` types to permit
164
164
165
165
### Fixed
166
166
167
-
-[#95](https://github.com/bytecodealliance/wasm-tools-go/issues/95): `wit-bindgen-go` now correctly generates packed `data` shape types for `variant` and `result` types.
167
+
-[#95](https://github.com/bytecodealliance/go-modules/issues/95): `wit-bindgen-go` now correctly generates packed `data` shape types for `variant` and `result` types.
168
168
- Fixed swapped `Shape` and `Align` type parameters in the functions `cm.New` and `cm.Case` for manipulating `variant` types.
169
169
- Variant validation now correctly reports `variant` instead of `result` in panic messages.
-[#95](https://github.com/bytecodealliance/wasm-tools-go/issues/95): `variant` and `result` types without fully-packed `data` shape types will not correctly represent all associated types.
178
-
-[#111](https://github.com/bytecodealliance/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.
179
-
-[#118](https://github.com/bytecodealliance/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.
177
+
-[#95](https://github.com/bytecodealliance/go-modules/issues/95): `variant` and `result` types without fully-packed `data` shape types will not correctly represent all associated types.
178
+
-[#111](https://github.com/bytecodealliance/go-modules/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.
179
+
-[#118](https://github.com/bytecodealliance/go-modules/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.
180
180
- 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.
Copy file name to clipboardExpand all lines: DESIGN.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Similarly, a function is exported for each resource method (e.g. `drink` and `sp
40
40
41
41
### Post-Return
42
42
43
-
**Note: as of v0.1.0, this package does not support post-return functions.** See [#118](https://github.com/bytecodealliance/wasm-tools-go/issues/118) for more information.
43
+
**Note: as of v0.1.0, this package does not support post-return functions.** See [#118](https://github.com/bytecodealliance/go-modules/issues/118) for more information.
44
44
45
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).
0 commit comments