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

Investigate moving away from requiring #[wasm_bindgen(start)] attr #19

Closed
1 task done
thedodd opened this issue Aug 27, 2020 · 2 comments
Closed
1 task done

Investigate moving away from requiring #[wasm_bindgen(start)] attr #19

thedodd opened this issue Aug 27, 2020 · 2 comments
Labels
cli Trunk CLI application discussion This item needs some discussion documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@thedodd
Copy link
Member

thedodd commented Aug 27, 2020

Per some discussion here https://discordapp.com/channels/701068342760570933/701068343431528490/748623604563837030 it looks like we may be able to move away from requiring folks to use the #[wasm_bindgen(start)] attribute.

Also see rustwasm/wasm-bindgen#1057 (comment)


todo

  • update the readme example to use fn main without the #[wasm_bindgen(start)] attribute.
@thedodd thedodd added core discussion This item needs some discussion documentation Improvements or additions to documentation labels Aug 27, 2020
@siku2
Copy link
Contributor

siku2 commented Sep 7, 2020

Finally got a chance to try this out and I'm happy to report that this already works out of the box. You can see it being used here.

So this is just a matter of updating the template / documentation.

@thedodd
Copy link
Member Author

thedodd commented Sep 8, 2020

Awesome! Thanks for pointing this out @siku2. I'll add a TODO item to this issue for removing said attribute from the main function. Overall this should help to reduce cognitive load a good bit.

@thedodd thedodd added good first issue Good for newcomers help wanted Extra attention is needed cli Trunk CLI application and removed core labels Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Trunk CLI application discussion This item needs some discussion documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants