wit-bindgen
wit-bindgen copied to clipboard
A language binding generator for WebAssembly interface types
Right now all language bindings (and the CLI) support import and export modes. Figuring out what this means within each language generator is confusing and easily forgotten. I don't like...
I'm would like to use wit to generate host/wasmtime and guest/rust bindings for [lunatic](https://github.com/lunatic-solutions/lunatic). However, I'm still not sure how to correctly model a specific use case. In lunatic some...
This repository: https://github.com/sunfishcode/import-export-demo contains a wit-bindgen project which imports provider.wit: ```wit resource thing { frob: function() } ``` and exports runner.wit: ```wit use { thing } from provider doit: function(it:...
There doesn't appear to be a way in the `wit-bindgen-wasmtime` implementation for accessing a caller's export function or memory from a host implementation. Is this a valid scenario for this...
From my understanding every type in a `.wit` file is treated as an export. Using `use` allows importing types from other files. Like with header files these types can be...
Here is the minimal wit file: ```wit record result { data: list, } func: function() -> expected ``` Which yields the following error: ``` error[E0107]: this struct takes 0 generic...
Unless I'm missing something, it currently does not seem possible for one `wit_bindgen_wasmtime::export/import!()` macro to use definitions produced by another `export!/import!` macro. My use case is allowing crates to use...
A very unlikely type, but currently. ```wit record person { name: string, age: option, } ``` becomes ```ts export interface Person { name: string, age?: number | null | null,...
Currently when generating js code, there is an additional `.d.ts` file generated. Furthermore, the JS that is generated requires ESM support. Instead could there just be TS generated that then...
Types like `string | URL` are pretty common in JS, so would it be a good idea for unions to map to that rather than being the same as variants?...