Skip to content

Add native Solana program feature#187

Open
Rhovian wants to merge 1 commit into
switchboard-xyz:mainfrom
Rhovian:codex/native-feature
Open

Add native Solana program feature#187
Rhovian wants to merge 1 commit into
switchboard-xyz:mainfrom
Rhovian:codex/native-feature

Conversation

@Rhovian

@Rhovian Rhovian commented May 30, 2026

Copy link
Copy Markdown

Summary

Adds a native feature for non-Anchor, non-Pinocchio Solana programs:

  • keeps solana-v3 as the existing Solana version selector
  • adds native = ["solana-v3"] as a first-class account/runtime integration option alongside anchor and pinocchio
  • gates instruction-builder exports behind CPI/client features so native consumers can use quote verification/account parsing without pulling that surface
  • makes libsecp256k1, spl-token, and spl-associated-token-account optional and enables them only from the existing client/CPI paths that need them
  • enables bytemuck/derive for the existing bytemuck::Pod and bytemuck::Zeroable derives

Motivation

Native Solana programs that consume Switchboard quotes should not need to opt into Anchor, Pinocchio, client builders, CPI helpers, SPL token helper crates, or secp256k1 helper APIs just to use the on-chain quote verification path.

This keeps solana-v3 intact as a compatibility/version feature and introduces native as the integration flavor. devnet remains independent.

Validation

  • cargo check --no-default-features --features native
  • cargo check

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.

1 participant