-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add attribute for custom path to wasm_bindgen
#3360
Conversation
wasm_bindgen: syn::parse_quote! { wasm_bindgen }, | ||
wasm_bindgen_futures: syn::parse_quote! { wasm_bindgen_futures }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have been ::wasm_bindgen
and ::wasm_bindgen_futures
for added proc-macro hygiene. Unfortunately that would be a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mentioning it here for reference: we can make that change alongside #3372.
wasm_bindgen: wasm_bindgen.unwrap_or_else(|| syn::parse_quote! { wasm_bindgen }), | ||
wasm_bindgen_futures: wasm_bindgen_futures | ||
.unwrap_or_else(|| syn::parse_quote! { wasm_bindgen_futures }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
ce4ac9a
to
76ca9f6
Compare
The latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
wasm_bindgen: syn::parse_quote! { wasm_bindgen }, | ||
wasm_bindgen_futures: syn::parse_quote! { wasm_bindgen_futures }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mentioning it here for reference: we can make that change alongside #3372.
@@ -0,0 +1,43 @@ | |||
extern crate wasm_bindgen as extern_test; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we should have a separate crate which renames wasm-bindgen in Cargo.toml but this should also suffice
This adds two new attributes:
wasm_bindgen
andwasm_bindgen_futures
, which allow to specify the path to both crates if they were renamed or re-exported from a different crate.This is analogous to Tokio, Serde or Pollster.