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

Allow user to use the function named main for #[ewasm_main] #36

Closed
yanganto opened this issue Jun 1, 2021 · 1 comment
Closed

Allow user to use the function named main for #[ewasm_main] #36

yanganto opened this issue Jun 1, 2021 · 1 comment
Labels
help wanted Extra attention is needed utils Something helps develop ewasm contract

Comments

@yanganto
Copy link
Member

yanganto commented Jun 1, 2021

#[ewasm_main] is a macro to wrap a function to with main function for ewasm.
Currently, the function wrappered is not allow to be name as main.

For a better UX, it is good to rename the function when its name is main, and not panic.

Please help with this issue.

Relate PR #35
https://github.com/second-state/SewUp/pull/35/files#diff-6f891a9986798db9fa65d7dd779c98c44afa864739fdd39a556eafdcdb75a943R19
https://github.com/second-state/SewUp/blob/main/sewup-derive/src/lib.rs#L19

@yanganto yanganto added help wanted Extra attention is needed utils Something helps develop ewasm contract labels Jun 1, 2021
@yanganto
Copy link
Member Author

yanganto commented Jun 1, 2021

This is not a issue with nesting functions

@yanganto yanganto closed this as completed Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed utils Something helps develop ewasm contract
Projects
None yet
Development

No branches or pull requests

1 participant