Skip to content
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

Example of js_export use #244

Open
David-OConnor opened this issue Jun 29, 2018 · 1 comment
Open

Example of js_export use #244

David-OConnor opened this issue Jun 29, 2018 · 1 comment

Comments

@David-OConnor
Copy link

@David-OConnor David-OConnor commented Jun 29, 2018

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.

@koute
Copy link
Owner

@koute koute commented Jun 29, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.