wit-bindgen
wit-bindgen copied to clipboard
A language binding generator for WebAssembly interface types
Per https://github.com/bytecodealliance/wit-bindgen/pull/968#issuecomment-2175527144, we should generate meaningful `ToString` method overrides, at least for types which are used as errors. This would allow us to generate a useful diagnostic message when constructing...
After upgrading `wit-bindgen`, the following error occurred during `cargo component build` ``` Creating component /workspaces/product/components/target/wasm32-wasi/debug/test.wasm error: decoding custom section component-type:wit-bindgen:0.26.0:platform:encoded world Caused by: unexpected end-of-file (at offset 0x4c70) ``` while...
For a particular combination of `use`, `import`, and `export` with aggregate types (records containing lists), wit-bindgen generates invalid Rust, producing the following compiler error: ``` struct takes 0 lifetime arguments...
The following works in the latest release but not on main: ```wit package my-ns:my-package; interface my-interface { my-func: func(); } world my-world { import my-interface; export my-interface; } ``` ```rust...
This is a potential alternative to #965 but they aren't necessarily mutually exclusive. The goal here is to create an easy way to see the concrete canonical ABI details for...
It would be useful if each type had its size and alignment, and additionally if each field in a record or whatever should have its offset, etc... Maybe optionally via...
Given .wit like this ```wit package example:q world test { export hello: func() -> list; } ``` and impl in rs: ```rs wit_bindgen::generate!({ world: "test", }); struct Test; impl Guest...
As of this writing, we cannot safely drop a handle to an imported resource from a .NET finalizer because it may still have one or more open child resources. Once...
Currently, the generated resource types have a finalizer, like [this](https://github.com/dotnet/runtime/blob/7ff684af49cdf008bebbe10efcc10a2649795d65/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.cs#L5279-L5281). This logic is not correct if the resource type may have child resources - this will trap on `drop`. See...
[TinyGo 0.3.3 was released on August 20, 2024](https://github.com/tinygo-org/tinygo/releases/tag/v0.33.0) and adds support for WASI preview 2 compilations via its new `wasip2` compiler target. I am currently using wit-bindgen to run Go...