Skip to content

Commit

Permalink
missing frozen-abi support
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Sep 5, 2024
1 parent d3c76d1 commit e02b542
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ frozen-abi = [
"dep:solana-frozen-abi-macro",
"solana-program/frozen-abi",
"solana-short-vec/frozen-abi",
"solana-feature-set/frozen-abi"
]

[dependencies]
Expand Down
12 changes: 12 additions & 0 deletions sdk/feature-set/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,19 @@ edition = { workspace = true }

[dependencies]
lazy_static = { workspace = true }
solana-frozen-abi = { workspace = true, optional = true }
solana-frozen-abi-macro = { workspace = true, optional = true }
solana-program = { workspace = true }

[build-dependencies]
rustc_version = { workspace = true, optional = true }

[features]
frozen-abi = [
"dep:rustc_version",
"dep:solana-frozen-abi",
"dep:solana-frozen-abi-macro",
]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
1 change: 1 addition & 0 deletions sdk/feature-set/build.rs
3 changes: 2 additions & 1 deletion sdk/feature-set/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
//! 3. Add desired logic to check for and switch on feature availability.
//!
//! For more information on how features are picked up, see comments for `Feature`.
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]

use {
lazy_static::lazy_static,
Expand Down Expand Up @@ -1110,7 +1111,7 @@ lazy_static! {
}

/// `FeatureSet` holds the set of currently active/inactive runtime features
#[cfg_attr(feature = "frozen-abi", derive(AbiExample))]
#[cfg_attr(feature = "frozen-abi", derive(solana_frozen_abi_macro::AbiExample))]
#[derive(Debug, Clone, Eq, PartialEq)]
pub struct FeatureSet {
pub active: HashMap<Pubkey, Slot>,
Expand Down

0 comments on commit e02b542

Please sign in to comment.