-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding #[wasm_bindgen] to Builder #221
Comments
Is it necessary in that situation to add it to the setter methods as well? |
I believe it only needs to be implemented on any methods that must be available from JavaScript. |
On the surface this sounds possible, but I have some concerns around how it will play with other features:
It's important to me that new features largely interoperate with other existing features; documentation of proc-macros is still difficult, so having too many edge cases would make the crate very hard to use. I currently have other time commitments that prevent me from working on this, but if someone else wants to take on the implementation and testing I'll happily review the results. |
I don't see good answers to the above questions on the horizon, and don't think That said, I also don't see as many One could even make a proc-macro for it, e.g. |
This is now actually possible using |
Following on from the addition of attribute pass-through for fields and setters, it's now possible to specify attributes for the struct using `#[builder_struct_attr(...)]` and for the inherent impl block using `#[builder_impl_attr(...)]`. With this change, container-level `serde` attributes are supported and `#[wasm_bindgen]` is possible, fixing #221 (though making the builder work with WASM remains the caller's responsibility). Fixes #239
Following on from the addition of attribute pass-through for fields and setters, it's now possible to specify attributes for the struct using `#[builder_struct_attr(...)]` and for the inherent impl block using `#[builder_impl_attr(...)]`. With this change, container-level `serde` attributes are supported and `#[wasm_bindgen]` is possible, fixing #221 (though making the builder work with WASM remains the caller's responsibility). Fixes #239
Hi,
Is it possible to add this macro to the builder? Maybe just behind a feature flag.
Thanks,
The text was updated successfully, but these errors were encountered: