2

After creating a new Anchor project, when you do anchor build you will see this warning:

Warning: cargo-build-bpf is deprecated. Please, use cargo-build-sbf

After looking into the cargo build options, it turns out you can toggle pass in the --arch sbf option that switches to cargo-build-sbf.

This all seems to work well, but the downside is that I have to specify it on each command (anchor build --arch sbf, anchor test --arch sbf).

I was wondering if there's a way to configure an Anchor project to use the sbf arch by default.

1 Answer 1

2

I took a look at the code, and ProgramArch isn't included anywhere in the config file at https://github.com/coral-xyz/anchor/blob/29b8a7280075426a698aeaae3f117f0a609cca15/cli/src/config.rs#L342, so this is not possible.

You could put in a PR to add this to the config somewhere though, maybe at the top-level?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.