You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, some programs specify a bpf-entrypoint feature, which enables the entrypoint for program builds. Historically, programs have used the no-entrypoint feature to disable the entrypoint, which is an antipattern for crate features, which should typically add functionality rather than remove.
I think the additive bpf-entrypoint feature is probably a good standard. Optionally we could try to pack a few things into platform tools, like automatically detecting this feature when building with cargo build-sbf and/or allowing some custom crate type (ie. crate-type = ["sbf"]) that could abstract some of the entrypoint boilerplate.
I also think we should consider renaming the feature to sbf-entrypoint. 😅
Hey guys, am I right to say this would be for Solana 2.0+? If so, we already have that information when we generate the template so we can add that flag for Solana 2.0+ only. Wdyt?
There's nothing specific to Solana v2, it's whether we want to create a new convention that will make it easier to share program crates. With that said, this might not be such a big issue when we start generating and publishing client crates.
Problem
As noted at https://github.com/paladin-bladesmith/sol-stake-view-program/pull/5/files#r1699203567, there are some competing ways of defining certain program features and then using them.
In this case, some programs specify a
bpf-entrypoint
feature, which enables the entrypoint for program builds. Historically, programs have used theno-entrypoint
feature to disable the entrypoint, which is an antipattern for crate features, which should typically add functionality rather than remove.Proposed Solution
Come up with a standard and use it here!
cc @febo @buffalojoec
The text was updated successfully, but these errors were encountered: