stdweb
stdweb copied to clipboard
Example of js_export use
I think the documentation on the main page needs a full example of js_export use that includes how to import it, or one of the examples in the examples folder should include this.
When I try #[macro_use]:
error: attribute procedural macros cannot be imported with #[macro_use]
...
help: instead, import the procedural macro like any other item: use stdweb_internal_macros::js_export;
If I try to import stdweb::stdweb_internal_macros::js_export:
module stdweb_internal_macros is private
edit: It appears that the correct way to import is: use stdweb::js_export;
I recommend adding that line to the example in the docs.
Yes, we already have an example crate for that which is linked to in the README. (:
https://github.com/koute/stdweb/tree/master/examples/hasher