We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
To support functionality like the following:
#![feature(proc_macro_mod)] #[wasm_bindgen] mod console { #[wasm_bindgen] extern "C" { #[wasm_bindgen(js_namespace = console)] pub fn log(s: &str); } }
This is an attempt to split the issues #253, #254, #450, possibly others, into 2 parts - the codegen part and the AST transform part.
It would also be useful functionality, to allow rust developers to put their bindings into something other than the global namespace.
The text was updated successfully, but these errors were encountered:
Note that this is supported today so long as console is pub (which is a bug). Are you thinking though that the macro itself should generate a module?
console
pub
Sorry, something went wrong.
Yeah I was thinking of generating something like
mod console { pub fn log(s: &str) { __our_mangled_external_fn(s) } } extern "C" { #[doc(hidden)] pub fn __our_mangled_external_fn(s: TheABIType) { // ... } }
or something else, I've not really figured out how wasm-bindgen joins the imports yet.
I've looked again, and I think this is probably a duplicate of that other issue.
No branches or pull requests
To support functionality like the following:
This is an attempt to split the issues #253, #254, #450, possibly others, into 2 parts - the codegen part and the AST transform part.
It would also be useful functionality, to allow rust developers to put their bindings into something other than the global namespace.
The text was updated successfully, but these errors were encountered: