-
Notifications
You must be signed in to change notification settings - Fork 27
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
[feat] Make the openvm::entry!
macro a proc-macro attribute
#1313
Conversation
This comment has been minimized.
This comment has been minimized.
|
||
/// Used for defining the guest's entrypoint and main function. | ||
/// | ||
/// When `#![no_main]` is used, the programs entrypoint and main function is left undefined. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering, do you think it's safe to add the #![no_main]
within the macro, where it figures out based on whether std is enabled etc? This has the benefit that on host we can make it always std
and allows cargo clippy
to work etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename suggestion, and wanted to ask/discuss if we can handle no_main
within the macro for better UX. Otherwise LGTM
Commit: 521f8af |
* Make the `openvm::entry!` macro a proc-macro attribute * Rename `entry` -> `main`
* Make the `openvm::entry!` macro a proc-macro attribute * Rename `entry` -> `main`
This resolves INT-2784. Now, instead of
openvm::entry!(main)
, we just write#[openvm::entry]
beforefn main
.