-
Notifications
You must be signed in to change notification settings - Fork 378
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
Extract entrypoint crate #2430
Extract entrypoint crate #2430
Conversation
7b452ab
to
86d5210
Compare
The Firedancer team maintains a line-for-line reimplementation of the |
86d5210
to
899ddf4
Compare
197cc80
to
9dd3953
Compare
9dd3953
to
294c042
Compare
7c4ce1d
to
d2a8514
Compare
d2a8514
to
93aa7b8
Compare
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.
Just a couple of nits, then this should be good to go!
sdk/entrypoint/Cargo.toml
Outdated
@@ -0,0 +1,19 @@ | |||
[package] | |||
name = "solana-entrypoint" |
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.
nit: what do you think about solana-program-entrypoint
for the name? I think that'll make it a bit clearer, since the term "entrypoint" is also used for gossip
sdk/entrypoint/src/lib.rs
Outdated
pub use {solana_account_info::MAX_PERMITTED_DATA_INCREASE, solana_program_error::ProgramResult}; | ||
// need to re-export msg for custom_heap_default macro | ||
pub use { | ||
solana_account_info::MAX_PERMITTED_DATA_INCREASE, solana_msg::msg as __msg, |
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.
nit: Is there a reason for the double underscore vs just one? We don't seem to use the double-underscore anywhere for private members, so how about just _msg
?
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.
It indicates that something is technically public but shouldn't be used externally https://users.rust-lang.org/t/when-to-name-a-mod-starting-with-2-underscore/85953
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.
Gotcha, works for me!
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.
Looks good to me! @yihau can you accept ownership of solana-program-entrypoint
?
✅ |
f889e52
to
eff0a0c
Compare
eff0a0c
to
627fc0e
Compare
😱 New commits were pushed while the automerge label was present. |
Had to fix some conflicts, could you approve again @joncinque? |
automerge label removed due to a CI failure |
* extract entrypoint crate * missing re-export * fix path * fmt * rename to solana-program-entrypoint * move to program-entrypoint dir * update lock files
Problem
entrypoint.rs needs to be made available outside solana_program
This branches off #2429 so that needs to be merged first.
Summary of Changes
solana_msg::msg
in the new crate so that thecustom_heap_default
macro still compiles reliablyFun milestone: this tower of PRs is enough to compile a hello-world program without using
solana_program
. On my machine it takes 1.75 seconds to compile such a program, while it takes 23 seconds to compile using solana-program 2.0