I've tried to pass in borrowed data as a param , or return it from Rust impl that is using wit-bindgen, but it choked on generate every time. :thinking:
What is the general support of borrow in wit-bindgen?
How to use it (if at all supported)?
There should be full support of borrow<T> in all rust bindings generators (e.g. wasmtime and wit-bindgen), but note that you cannot return a borrow<T> from a function. That's a requirement of the component model that it's not possible. I forget if WIT tooling reflects this in processing/bindings generation
Last updated: Dec 06 2025 at 05:03 UTC