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
Hi, first of all, I want to thank you all for the great work and effort you’ve put into this project.
Feature Request
It would be incredibly helpful to have the option to generate unused types when using the wasmtime::component::bindgen!() macro, similar to the functionality provided by the wit_bindgen::generate!() macro.
I’ve included a code example below to illustrate the desired functionality:
mod wsm {
wasmtime::component::bindgen!({
path:"wit",// NOTE: no equivalent for this option provided// generate_unused_types: true,});useself::example::example::types::{ReferencedType,// NoRefType: This type won't get generated};}mod wit {
wit_bindgen::generate!({
path:"wit",
generate_unused_types:true,});useself::example::example::types::{NoRefType,ReferencedType};}
Benefit
Generating unused types can be really useful when we aim to group shared types into a single package and generate them only once for use across multiple other packages.
Alternatives
The current workaround involves adding unused worlds, interfaces, or functions that reference the desired types, ensuring they are generated.
The text was updated successfully, but these errors were encountered:
Hi, first of all, I want to thank you all for the great work and effort you’ve put into this project.
Feature Request
It would be incredibly helpful to have the option to generate unused types when using the
wasmtime::component::bindgen!()
macro, similar to the functionality provided by thewit_bindgen::generate!()
macro.I’ve included a code example below to illustrate the desired functionality:
WIT File:
Code in Rust:
Benefit
Generating unused types can be really useful when we aim to group shared types into a single package and generate them only once for use across multiple other packages.
Alternatives
The current workaround involves adding unused worlds, interfaces, or functions that reference the desired types, ensuring they are generated.
The text was updated successfully, but these errors were encountered: