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

use bpf-entrypoint feature #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

use bpf-entrypoint feature #27

wants to merge 1 commit into from

Conversation

buffalojoec
Copy link

The rest of the programs we've written in BPF have swapped no-entrypoint for bpf-entrypoint, where the feature is now additive to enable the program ELF's entrypoint binding.

This change brings the Stake program into that same pattern.

@buffalojoec buffalojoec requested a review from 2501babe December 19, 2024 10:52
Copy link
Contributor

@febo febo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One little comment: we will need to build the program with the bpf-entrypoint feature enabled so the clients tests work:

At the moment it is not an issue since we don't have clients tests, so we could do it either in this PR or in a future one.

@2501babe
Copy link
Member

2501babe commented Dec 26, 2024

ty for doing this, i was aware of the feature switch but it slipped my mind

maybe unrelated to this pr but is there a better ux for the new paradigm than always supplying --features bpf-entrypoint manually? i cloned this to make sure tests run, and i have to provide the flag even to cargo test-sbf. seems a bit annoying that it doesnt do the right thing automatically

@buffalojoec
Copy link
Author

maybe unrelated to this pr but is there a better ux for the new paradigm than always supplying --features bpf-entrypoint manually? i cloned this to make sure tests run, and i have to provide the flag even to cargo test-sbf. seems a bit annoying that it doesnt do the right thing automatically

I was considering adding it to the build-sbf and test-sbf commands, but I wasn't totally sure if we wanted to make it a global standard for the platform tools. It could just be optionally enabled for crates that specify the feature. Wdyt?

@2501babe
Copy link
Member

2501babe commented Jan 2, 2025

yea if added it would need to check if the feature exists in Cargo.tom because if you specify the flag and the feature doesnt exist then cargo will halt with an error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants