Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vadorovsky
Copy link
Member

Make the atomic feature of solana-address dependency optional.

Fixes: #301

Make the `atomic` feature of `solana-address` dependency optional.

Fixes: anza-xyz#301
@joncinque
Copy link
Collaborator

This is technically a breaking change, but it won't be destructive! Since solana-pubkey is just re-exporting solana-address, if we make this change and bump solana-pubkey to v4, then v3 and v4 of solana-pubkey will be compatible, since they both just re-export the same major version of solana-address.

@stegaBOB
Copy link
Contributor

Actually running into this issue now as well. From what I can tell the solana-atomic crate should just be able to import atomic from core instead of std. Doesn't solve the issue for #[cfg(not(target_pointer_width = "64"))] with parking lot though

@joncinque joncinque added the breaking PR contains breaking changes label Sep 29, 2025
joncinque added a commit to joncinque/solana-sdk that referenced this pull request Oct 17, 2025
#### Problem

The pubkey crate doesn't compile for no-std environments because the
atomic feature is always enabled on address.

This is an alternative to anza-xyz#302.

#### Summary of changes

Add the "atomic" feature to the "std" feature in pubkey, and enable
"std" as appropriate for certain tests.

We could do the same with "decode", but since it isn't required, I'm
inclined to make a minimal change. People can switch to address for more
control.
@vadorovsky
Copy link
Member Author

Let's ship #388 instead

@vadorovsky vadorovsky closed this Oct 20, 2025
joncinque added a commit that referenced this pull request Oct 20, 2025
* pubkey: Make no-std compatible by enabling atomic with std

#### Problem

The pubkey crate doesn't compile for no-std environments because the
atomic feature is always enabled on address.

This is an alternative to #302.

#### Summary of changes

Add the "atomic" feature to the "std" feature in pubkey, and enable
"std" as appropriate for certain tests.

We could do the same with "decode", but since it isn't required, I'm
inclined to make a minimal change. People can switch to address for more
control.

* instruction: Add std feature for doc build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking PR contains breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

solana-pubkey: Building without std feature still pulls std

3 participants