فهرست منبع

Remove frozen-abi build script (#2911)

* replace cfg(RUSTC_WITH_SPECIALIZATION) with cfg(feature = "frozen-abi")

* remove the build scripts for the two frozen-abi crates

* remove all rustc_version deps

* remove a rustc_version dep that I missed

* fix duplicate lines in Cargo.toml files

* remove build.rs from instruction crate

* remove rustc_version from instruction crate

* remove no-longer-needed check-cfg entries

* update lock file after rebase
Kevin Heavey 1 سال پیش
والد
کامیت
6082e8434d
100فایلهای تغییر یافته به همراه195 افزوده شده و 339 حذف شده
  1. 0 31
      Cargo.lock
  2. 0 3
      Cargo.toml
  3. 6 6
      accounts-db/Cargo.toml
  4. 0 1
      accounts-db/build.rs
  5. 1 1
      accounts-db/src/accounts_db.rs
  6. 1 1
      accounts-db/src/lib.rs
  7. 6 6
      bloom/Cargo.toml
  8. 0 1
      bloom/build.rs
  9. 1 1
      bloom/src/lib.rs
  10. 3 5
      builtins-default-costs/Cargo.toml
  11. 0 1
      builtins-default-costs/build.rs
  12. 1 1
      builtins-default-costs/src/lib.rs
  13. 0 3
      cargo-registry/Cargo.toml
  14. 3 5
      compute-budget/Cargo.toml
  15. 0 1
      compute-budget/build.rs
  16. 1 1
      compute-budget/src/compute_budget.rs
  17. 1 1
      compute-budget/src/lib.rs
  18. 6 6
      core/Cargo.toml
  19. 0 1
      core/build.rs
  20. 1 1
      core/src/lib.rs
  21. 6 6
      cost-model/Cargo.toml
  22. 0 1
      cost-model/build.rs
  23. 1 1
      cost-model/src/lib.rs
  24. 7 6
      curves/secp256k1-recover/Cargo.toml
  25. 0 1
      curves/secp256k1-recover/build.rs
  26. 1 1
      curves/secp256k1-recover/src/lib.rs
  27. 3 5
      frozen-abi/Cargo.toml
  28. 0 25
      frozen-abi/build.rs
  29. 3 5
      frozen-abi/macro/Cargo.toml
  30. 0 1
      frozen-abi/macro/build.rs
  31. 20 25
      frozen-abi/macro/src/lib.rs
  32. 5 5
      frozen-abi/src/lib.rs
  33. 6 6
      gossip/Cargo.toml
  34. 0 1
      gossip/build.rs
  35. 1 1
      gossip/src/contact_info.rs
  36. 1 1
      gossip/src/lib.rs
  37. 6 6
      ledger/Cargo.toml
  38. 0 1
      ledger/build.rs
  39. 1 1
      ledger/src/lib.rs
  40. 6 8
      perf/Cargo.toml
  41. 0 24
      perf/build.rs
  42. 1 1
      perf/src/lib.rs
  43. 1 1
      perf/src/recycler.rs
  44. 6 6
      program-runtime/Cargo.toml
  45. 0 1
      program-runtime/build.rs
  46. 1 1
      program-runtime/src/lib.rs
  47. 2 2
      program-runtime/src/loaded_programs.rs
  48. 1 1
      program-runtime/src/sysvar_cache.rs
  49. 0 3
      programs/address-lookup-table/Cargo.toml
  50. 0 1
      programs/address-lookup-table/build.rs
  51. 1 1
      programs/address-lookup-table/src/lib.rs
  52. 0 3
      programs/stake-tests/Cargo.toml
  53. 0 3
      programs/stake/Cargo.toml
  54. 0 1
      programs/stake/build.rs
  55. 1 1
      programs/stake/src/lib.rs
  56. 6 6
      programs/vote/Cargo.toml
  57. 0 1
      programs/vote/build.rs
  58. 1 1
      programs/vote/src/lib.rs
  59. 0 3
      runtime-transaction/Cargo.toml
  60. 0 1
      runtime-transaction/build.rs
  61. 1 1
      runtime-transaction/src/lib.rs
  62. 6 6
      runtime/Cargo.toml
  63. 0 1
      runtime/build.rs
  64. 1 1
      runtime/src/bank/serde_snapshot.rs
  65. 1 1
      runtime/src/lib.rs
  66. 2 2
      runtime/src/serde_snapshot.rs
  67. 1 1
      runtime/src/serde_snapshot/storage.rs
  68. 4 4
      runtime/src/serde_snapshot/utils.rs
  69. 2 2
      runtime/src/stake_account.rs
  70. 6 6
      sdk/Cargo.toml
  71. 0 1
      sdk/build.rs
  72. 6 6
      sdk/feature-set/Cargo.toml
  73. 0 1
      sdk/feature-set/build.rs
  74. 1 1
      sdk/feature-set/src/lib.rs
  75. 6 6
      sdk/hash/Cargo.toml
  76. 0 1
      sdk/hash/build.rs
  77. 1 1
      sdk/hash/src/lib.rs
  78. 0 4
      sdk/instruction/Cargo.toml
  79. 0 1
      sdk/instruction/build.rs
  80. 1 1
      sdk/instruction/src/lib.rs
  81. 0 4
      sdk/program/Cargo.toml
  82. 0 1
      sdk/program/build.rs
  83. 1 1
      sdk/program/src/lib.rs
  84. 6 6
      sdk/pubkey/Cargo.toml
  85. 0 1
      sdk/pubkey/build.rs
  86. 1 1
      sdk/pubkey/src/lib.rs
  87. 6 6
      sdk/signature/Cargo.toml
  88. 0 1
      sdk/signature/build.rs
  89. 1 1
      sdk/signature/src/lib.rs
  90. 1 1
      sdk/src/fee.rs
  91. 1 1
      sdk/src/lib.rs
  92. 3 3
      sdk/src/packet.rs
  93. 1 1
      sdk/src/reserved_account_keys.rs
  94. 7 6
      short-vec/Cargo.toml
  95. 0 1
      short-vec/build.rs
  96. 1 1
      short-vec/src/lib.rs
  97. 6 6
      svm/Cargo.toml
  98. 0 1
      svm/build.rs
  99. 1 1
      svm/src/lib.rs
  100. 1 1
      svm/src/message_processor.rs

+ 0 - 31
Cargo.lock

@@ -87,7 +87,6 @@ dependencies = [
  "hex",
  "hyper",
  "log",
- "rustc_version 0.4.1",
  "serde",
  "serde_derive",
  "serde_json",
@@ -5713,7 +5712,6 @@ dependencies = [
  "rand 0.8.5",
  "rand_chacha 0.3.1",
  "rayon",
- "rustc_version 0.4.1",
  "seqlock",
  "serde",
  "serde_bytes",
@@ -5753,7 +5751,6 @@ dependencies = [
  "log",
  "num-derive",
  "num-traits",
- "rustc_version 0.4.1",
  "solana-feature-set",
  "solana-log-collector",
  "solana-program",
@@ -5918,7 +5915,6 @@ dependencies = [
  "log",
  "rand 0.8.5",
  "rayon",
- "rustc_version 0.4.1",
  "serde",
  "serde_derive",
  "solana-frozen-abi",
@@ -6013,7 +6009,6 @@ dependencies = [
  "lazy_static",
  "log",
  "rand 0.8.5",
- "rustc_version 0.4.1",
  "solana-address-lookup-table-program",
  "solana-bpf-loader-program",
  "solana-compute-budget-program",
@@ -6273,7 +6268,6 @@ dependencies = [
 name = "solana-compute-budget"
 version = "2.1.0"
 dependencies = [
- "rustc_version 0.4.1",
  "solana-frozen-abi",
  "solana-sdk",
 ]
@@ -6356,7 +6350,6 @@ dependencies = [
  "rand_chacha 0.3.1",
  "rayon",
  "rolling-file",
- "rustc_version 0.4.1",
  "rustls 0.23.13",
  "serde",
  "serde_bytes",
@@ -6431,7 +6424,6 @@ dependencies = [
  "lazy_static",
  "log",
  "rand 0.8.5",
- "rustc_version 0.4.1",
  "solana-builtins-default-costs",
  "solana-compute-budget",
  "solana-feature-set",
@@ -6587,7 +6579,6 @@ name = "solana-feature-set"
 version = "2.1.0"
 dependencies = [
  "lazy_static",
- "rustc_version 0.4.1",
  "solana-frozen-abi",
  "solana-frozen-abi-macro",
  "solana-program",
@@ -6612,7 +6603,6 @@ dependencies = [
  "im",
  "log",
  "memmap2",
- "rustc_version 0.4.1",
  "serde",
  "serde_bytes",
  "serde_derive",
@@ -6628,7 +6618,6 @@ version = "2.1.0"
 dependencies = [
  "proc-macro2",
  "quote",
- "rustc_version 0.4.1",
  "syn 2.0.77",
 ]
 
@@ -6714,7 +6703,6 @@ dependencies = [
  "rand 0.8.5",
  "rand_chacha 0.3.1",
  "rayon",
- "rustc_version 0.4.1",
  "serde",
  "serde_bytes",
  "serde_derive",
@@ -6759,7 +6747,6 @@ dependencies = [
  "bytemuck",
  "bytemuck_derive",
  "js-sys",
- "rustc_version 0.4.1",
  "serde",
  "serde_derive",
  "solana-atomic-u64",
@@ -6787,7 +6774,6 @@ dependencies = [
  "getrandom 0.2.10",
  "js-sys",
  "num-traits",
- "rustc_version 0.4.1",
  "serde",
  "serde_derive",
  "solana-define-syscall",
@@ -6860,7 +6846,6 @@ dependencies = [
  "rayon",
  "reed-solomon-erasure",
  "rocksdb",
- "rustc_version 0.4.1",
  "scopeguard",
  "serde",
  "serde_bytes",
@@ -7125,7 +7110,6 @@ dependencies = [
  "rand 0.8.5",
  "rand_chacha 0.3.1",
  "rayon",
- "rustc_version 0.4.1",
  "serde",
  "solana-frozen-abi",
  "solana-frozen-abi-macro",
@@ -7220,7 +7204,6 @@ dependencies = [
  "parking_lot 0.12.3",
  "qualifier_attr",
  "rand 0.8.5",
- "rustc_version 0.4.1",
  "serde",
  "serde_bytes",
  "serde_derive",
@@ -7295,7 +7278,6 @@ dependencies = [
  "num-traits",
  "percentage",
  "rand 0.8.5",
- "rustc_version 0.4.1",
  "serde",
  "solana-compute-budget",
  "solana-feature-set",
@@ -7366,7 +7348,6 @@ dependencies = [
  "js-sys",
  "num-traits",
  "rand 0.8.5",
- "rustc_version 0.4.1",
  "serde",
  "serde_derive",
  "solana-atomic-u64",
@@ -7665,7 +7646,6 @@ dependencies = [
  "rand_chacha 0.3.1",
  "rayon",
  "regex",
- "rustc_version 0.4.1",
  "serde",
  "serde_derive",
  "serde_json",
@@ -7726,7 +7706,6 @@ dependencies = [
  "criterion",
  "log",
  "rand 0.8.5",
- "rustc_version 0.4.1",
  "solana-builtins-default-costs",
  "solana-compute-budget",
  "solana-program",
@@ -7774,7 +7753,6 @@ dependencies = [
  "qualifier_attr",
  "rand 0.7.3",
  "rand 0.8.5",
- "rustc_version 0.4.1",
  "serde",
  "serde_bytes",
  "serde_derive",
@@ -7822,7 +7800,6 @@ dependencies = [
  "anyhow",
  "borsh 1.5.1",
  "libsecp256k1",
- "rustc_version 0.4.1",
  "solana-define-syscall",
  "solana-frozen-abi",
  "solana-frozen-abi-macro",
@@ -7877,7 +7854,6 @@ version = "2.1.0"
 dependencies = [
  "assert_matches",
  "bincode",
- "rustc_version 0.4.1",
  "serde",
  "serde_json",
  "solana-frozen-abi",
@@ -7893,7 +7869,6 @@ dependencies = [
  "ed25519-dalek",
  "generic-array 0.14.7",
  "rand 0.8.5",
- "rustc_version 0.4.1",
  "serde",
  "serde_derive",
  "solana-frozen-abi",
@@ -7926,7 +7901,6 @@ dependencies = [
  "bincode",
  "log",
  "proptest",
- "rustc_version 0.4.1",
  "solana-compute-budget",
  "solana-config-program",
  "solana-feature-set",
@@ -7945,7 +7919,6 @@ version = "2.1.0"
 dependencies = [
  "assert_matches",
  "bincode",
- "rustc_version 0.4.1",
  "solana-feature-set",
  "solana-program-test",
  "solana-sdk",
@@ -8052,7 +8025,6 @@ dependencies = [
  "prost",
  "qualifier_attr",
  "rand 0.8.5",
- "rustc_version 0.4.1",
  "serde",
  "serde_derive",
  "shuttle",
@@ -8461,7 +8433,6 @@ name = "solana-version"
 version = "2.1.0"
 dependencies = [
  "log",
- "rustc_version 0.4.1",
  "semver 1.0.23",
  "serde",
  "serde_derive",
@@ -8481,7 +8452,6 @@ dependencies = [
  "itertools 0.12.1",
  "log",
  "rand 0.8.5",
- "rustc_version 0.4.1",
  "serde",
  "serde_derive",
  "solana-frozen-abi",
@@ -8499,7 +8469,6 @@ dependencies = [
  "log",
  "num-derive",
  "num-traits",
- "rustc_version 0.4.1",
  "serde",
  "serde_derive",
  "solana-feature-set",

+ 0 - 3
Cargo.toml

@@ -178,8 +178,6 @@ level = "warn"
 check-cfg = [
     'cfg(target_os, values("solana"))',
     'cfg(feature, values("frozen-abi", "no-entrypoint"))',
-    'cfg(RUSTC_WITH_SPECIALIZATION)',
-    'cfg(RUSTC_WITHOUT_SPECIALIZATION)',
 ]
 
 [workspace.dependencies]
@@ -338,7 +336,6 @@ reqwest = { version = "0.11.27", default-features = false }
 reqwest-middleware = "0.2.5"
 rolling-file = "0.2.0"
 rpassword = "7.3"
-rustc_version = "0.4"
 rustls = { version = "0.23.13", default-features = false }
 scopeguard = "1.2.0"
 semver = "1.0.23"

+ 6 - 6
accounts-db/Cargo.toml

@@ -37,8 +37,12 @@ serde = { workspace = true, features = ["rc"] }
 serde_derive = { workspace = true }
 smallvec = { workspace = true, features = ["const_generics"] }
 solana-bucket-map = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-inline-spl = { workspace = true }
 solana-lattice-hash = { workspace = true }
 solana-measure = { workspace = true }
@@ -79,9 +83,6 @@ test-case = { workspace = true }
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 dev-context-only-utils = [
     "dep:qualifier_attr",
@@ -89,7 +90,6 @@ dev-context-only-utils = [
     "dep:solana-vote-program",
 ]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "solana-sdk/frozen-abi",

+ 0 - 1
accounts-db/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
accounts-db/src/accounts_db.rs

@@ -2415,7 +2415,7 @@ pub fn make_min_priority_thread_pool() -> ThreadPool {
         .unwrap()
 }
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl solana_frozen_abi::abi_example::AbiExample for AccountsDb {
     fn example() -> Self {
         let accounts_db = AccountsDb::new_single_for_tests();

+ 1 - 1
accounts-db/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 
 #[macro_use]

+ 6 - 6
bloom/Cargo.toml

@@ -16,8 +16,12 @@ log = { workspace = true }
 rand = { workspace = true }
 serde = { workspace = true, features = ["rc"] }
 serde_derive = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-sanitize = { workspace = true }
 solana-sdk = { workspace = true }
 
@@ -31,12 +35,8 @@ name = "solana_bloom"
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "solana-sdk/frozen-abi",

+ 0 - 1
bloom/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
bloom/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 pub mod bloom;
 
 #[cfg_attr(feature = "frozen-abi", macro_use)]

+ 3 - 5
builtins-default-costs/Cargo.toml

@@ -17,7 +17,9 @@ solana-address-lookup-table-program = { workspace = true }
 solana-bpf-loader-program = { workspace = true }
 solana-compute-budget-program = { workspace = true }
 solana-config-program = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-loader-v4-program = { workspace = true }
 solana-sdk = { workspace = true }
 solana-stake-program = { workspace = true }
@@ -35,12 +37,8 @@ rand = "0.8.5"
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "solana-vote-program/frozen-abi",
 ]

+ 0 - 1
builtins-default-costs/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
builtins-default-costs/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 use {
     ahash::AHashMap,

+ 0 - 3
cargo-registry/Cargo.toml

@@ -39,8 +39,5 @@ toml = { workspace = true }
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 dev-context-only-utils = []

+ 3 - 5
compute-budget/Cargo.toml

@@ -10,15 +10,13 @@ license = { workspace = true }
 edition = { workspace = true }
 
 [dependencies]
-solana-frozen-abi = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-sdk = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "solana-sdk/frozen-abi",
 ]

+ 0 - 1
compute-budget/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
compute-budget/src/compute_budget.rs

@@ -1,6 +1,6 @@
 use crate::compute_budget_limits::{self, ComputeBudgetLimits, DEFAULT_HEAP_COST};
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl ::solana_frozen_abi::abi_example::AbiExample for ComputeBudget {
     fn example() -> Self {
         // ComputeBudget is not Serialize so just rely on Default.

+ 1 - 1
compute-budget/src/lib.rs

@@ -1,5 +1,5 @@
 //! Solana compute budget types and default configurations.
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 
 pub mod compute_budget;
 pub mod compute_budget_limits;

+ 6 - 6
core/Cargo.toml

@@ -54,8 +54,12 @@ solana-cost-model = { workspace = true }
 solana-entry = { workspace = true }
 solana-feature-set = { workspace = true }
 solana-fee = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-geyser-plugin-manager = { workspace = true }
 solana-gossip = { workspace = true }
 solana-ledger = { workspace = true }
@@ -118,15 +122,11 @@ test-case = { workspace = true }
 [target."cfg(unix)".dependencies]
 sysctl = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 dev-context-only-utils = [
     "solana-runtime/dev-context-only-utils",
 ]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "solana-accounts-db/frozen-abi",

+ 0 - 1
core/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
core/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 #![recursion_limit = "2048"]
 //! The `solana` library implements the Solana high-performance blockchain architecture.

+ 6 - 6
cost-model/Cargo.toml

@@ -16,8 +16,12 @@ log = { workspace = true }
 solana-builtins-default-costs = { workspace = true }
 solana-compute-budget = { workspace = true }
 solana-feature-set = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-metrics = { workspace = true }
 solana-runtime-transaction = { workspace = true }
 solana-sdk = { workspace = true }
@@ -40,12 +44,8 @@ test-case = { workspace = true }
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "solana-compute-budget/frozen-abi",

+ 0 - 1
cost-model/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
cost-model/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 
 pub mod block_cost_limits;

+ 7 - 6
curves/secp256k1-recover/Cargo.toml

@@ -11,8 +11,12 @@ edition = { workspace = true }
 
 [dependencies]
 borsh = { workspace = true, optional = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 thiserror = { workspace = true }
 
 [target.'cfg(target_os = "solana")'.dependencies]
@@ -28,12 +32,9 @@ borsh = { workspace = true }
 [target.'cfg(not(target_os = "solana"))'.dev-dependencies]
 libsecp256k1 = { workspace = true, features = ["hmac"] }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 borsh = ["dep:borsh"]
-frozen-abi = ["dep:rustc_version", "dep:solana-frozen-abi", "dep:solana-frozen-abi-macro"]
+frozen-abi = ["dep:solana-frozen-abi", "dep:solana-frozen-abi-macro"]
 
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]

+ 0 - 1
curves/secp256k1-recover/build.rs

@@ -1 +0,0 @@
-../../frozen-abi/build.rs

+ 1 - 1
curves/secp256k1-recover/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 //! Public key recovery from [secp256k1] ECDSA signatures.
 //!
 //! [secp256k1]: https://en.bitcoin.it/wiki/Secp256k1

+ 3 - 5
frozen-abi/Cargo.toml

@@ -29,12 +29,10 @@ bitflags = { workspace = true, features = ["serde"] }
 serde_bytes = { workspace = true }
 solana-logger = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true }
-
 [features]
-default = ["frozen-abi"]
-# no reason to deactivate this. It's needed because the build.rs is reused elsewhere
+default = []
+# activate the frozen-abi feature when we actually want to do frozen-abi testing,
+# otherwise leave it off because it requires nightly Rust
 frozen-abi = []
 
 [lints]

+ 0 - 25
frozen-abi/build.rs

@@ -1,25 +0,0 @@
-#[cfg(feature = "frozen-abi")]
-extern crate rustc_version;
-#[cfg(feature = "frozen-abi")]
-use rustc_version::{version_meta, Channel};
-
-fn main() {
-    #[cfg(feature = "frozen-abi")]
-    // Copied and adapted from
-    // https://github.com/Kimundi/rustc-version-rs/blob/1d692a965f4e48a8cb72e82cda953107c0d22f47/README.md#example
-    // Licensed under Apache-2.0 + MIT
-    match version_meta().unwrap().channel {
-        Channel::Stable => {
-            println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION");
-        }
-        Channel::Beta => {
-            println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION");
-        }
-        Channel::Nightly => {
-            println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION");
-        }
-        Channel::Dev => {
-            println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION");
-        }
-    }
-}

+ 3 - 5
frozen-abi/macro/Cargo.toml

@@ -17,12 +17,10 @@ proc-macro2 = { workspace = true }
 quote = { workspace = true }
 syn = { workspace = true, features = ["full", "extra-traits"] }
 
-[build-dependencies]
-rustc_version = { workspace = true }
-
 [features]
-default = ["frozen-abi"]
-# no reason to deactivate this. It's needed because the build.rs is reused elsewhere
+default = []
+# activate the frozen-abi feature when we actually want to do frozen-abi testing,
+# otherwise leave it off because it requires nightly Rust
 frozen-abi = []
 
 [lints]

+ 0 - 1
frozen-abi/macro/build.rs

@@ -1 +0,0 @@
-../build.rs

+ 20 - 25
frozen-abi/macro/src/lib.rs

@@ -1,43 +1,38 @@
 extern crate proc_macro;
 
-// This file littered with these essential cfgs so ensure them.
-#[cfg(not(any(RUSTC_WITH_SPECIALIZATION, RUSTC_WITHOUT_SPECIALIZATION)))]
-compile_error!("rustc_version is missing in build dependency and build.rs is not specified");
-
-#[cfg(any(RUSTC_WITH_SPECIALIZATION, RUSTC_WITHOUT_SPECIALIZATION))]
 use proc_macro::TokenStream;
 
 // Define dummy macro_attribute and macro_derive for stable rustc
 
-#[cfg(RUSTC_WITHOUT_SPECIALIZATION)]
+#[cfg(not(feature = "frozen-abi"))]
 #[proc_macro_attribute]
 pub fn frozen_abi(_attrs: TokenStream, item: TokenStream) -> TokenStream {
     item
 }
 
-#[cfg(RUSTC_WITHOUT_SPECIALIZATION)]
+#[cfg(not(feature = "frozen-abi"))]
 #[proc_macro_derive(AbiExample)]
 pub fn derive_abi_sample(_item: TokenStream) -> TokenStream {
     "".parse().unwrap()
 }
 
-#[cfg(RUSTC_WITHOUT_SPECIALIZATION)]
+#[cfg(not(feature = "frozen-abi"))]
 #[proc_macro_derive(AbiEnumVisitor)]
 pub fn derive_abi_enum_visitor(_item: TokenStream) -> TokenStream {
     "".parse().unwrap()
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 use proc_macro2::{Span, TokenStream as TokenStream2, TokenTree};
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 use quote::{quote, ToTokens};
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 use syn::{
     parse_macro_input, Attribute, Error, Fields, Ident, Item, ItemEnum, ItemStruct, ItemType,
     LitStr, Variant,
 };
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 fn filter_serde_attrs(attrs: &[Attribute]) -> bool {
     fn contains_skip(tokens: TokenStream2) -> bool {
         for token in tokens.into_iter() {
@@ -72,7 +67,7 @@ fn filter_serde_attrs(attrs: &[Attribute]) -> bool {
     false
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 fn filter_allow_attrs(attrs: &mut Vec<Attribute>) {
     attrs.retain(|attr| {
         let ss = &attr.path().segments.first().unwrap().ident.to_string();
@@ -80,7 +75,7 @@ fn filter_allow_attrs(attrs: &mut Vec<Attribute>) {
     });
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 fn derive_abi_sample_enum_type(input: ItemEnum) -> TokenStream {
     let type_name = &input.ident;
 
@@ -157,7 +152,7 @@ fn derive_abi_sample_enum_type(input: ItemEnum) -> TokenStream {
     result.into()
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 fn derive_abi_sample_struct_type(input: ItemStruct) -> TokenStream {
     let type_name = &input.ident;
     let mut sample_fields = quote! {};
@@ -212,7 +207,7 @@ fn derive_abi_sample_struct_type(input: ItemStruct) -> TokenStream {
     result.into()
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 #[proc_macro_derive(AbiExample)]
 pub fn derive_abi_sample(item: TokenStream) -> TokenStream {
     let item = parse_macro_input!(item as Item);
@@ -226,7 +221,7 @@ pub fn derive_abi_sample(item: TokenStream) -> TokenStream {
     }
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 fn do_derive_abi_enum_visitor(input: ItemEnum) -> TokenStream {
     let type_name = &input.ident;
     let mut serialized_variants = quote! {};
@@ -264,7 +259,7 @@ fn do_derive_abi_enum_visitor(input: ItemEnum) -> TokenStream {
     }).into()
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 #[proc_macro_derive(AbiEnumVisitor)]
 pub fn derive_abi_enum_visitor(item: TokenStream) -> TokenStream {
     let item = parse_macro_input!(item as Item);
@@ -277,7 +272,7 @@ pub fn derive_abi_enum_visitor(item: TokenStream) -> TokenStream {
     }
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 fn quote_for_test(
     test_mod_ident: &Ident,
     type_name: &Ident,
@@ -321,12 +316,12 @@ fn quote_for_test(
     }
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 fn test_mod_name(type_name: &Ident) -> Ident {
     Ident::new(&format!("{type_name}_frozen_abi"), Span::call_site())
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 fn frozen_abi_type_alias(input: ItemType, expected_digest: &str) -> TokenStream {
     let type_name = &input.ident;
     let test = quote_for_test(&test_mod_name(type_name), type_name, expected_digest);
@@ -337,7 +332,7 @@ fn frozen_abi_type_alias(input: ItemType, expected_digest: &str) -> TokenStream
     result.into()
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 fn frozen_abi_struct_type(input: ItemStruct, expected_digest: &str) -> TokenStream {
     let type_name = &input.ident;
     let test = quote_for_test(&test_mod_name(type_name), type_name, expected_digest);
@@ -348,7 +343,7 @@ fn frozen_abi_struct_type(input: ItemStruct, expected_digest: &str) -> TokenStre
     result.into()
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 fn quote_sample_variant(
     type_name: &Ident,
     ty_generics: &syn::TypeGenerics,
@@ -394,7 +389,7 @@ fn quote_sample_variant(
     }
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 fn frozen_abi_enum_type(input: ItemEnum, expected_digest: &str) -> TokenStream {
     let type_name = &input.ident;
     let test = quote_for_test(&test_mod_name(type_name), type_name, expected_digest);
@@ -405,7 +400,7 @@ fn frozen_abi_enum_type(input: ItemEnum, expected_digest: &str) -> TokenStream {
     result.into()
 }
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 #[proc_macro_attribute]
 pub fn frozen_abi(attrs: TokenStream, item: TokenStream) -> TokenStream {
     let mut expected_digest: Option<String> = None;

+ 5 - 5
frozen-abi/src/lib.rs

@@ -1,17 +1,17 @@
 #![allow(incomplete_features)]
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(specialization))]
 
 // Allows macro expansion of `use ::solana_frozen_abi::*` to work within this crate
 extern crate self as solana_frozen_abi;
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 pub mod abi_digester;
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 pub mod abi_example;
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 mod hash;
 
-#[cfg(RUSTC_WITH_SPECIALIZATION)]
+#[cfg(feature = "frozen-abi")]
 #[macro_use]
 extern crate solana_frozen_abi_macro;
 

+ 6 - 6
gossip/Cargo.toml

@@ -33,8 +33,12 @@ solana-client = { workspace = true }
 solana-connection-cache = { workspace = true }
 solana-entry = { workspace = true }
 solana-feature-set = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-ledger = { workspace = true }
 solana-logger = { workspace = true }
 solana-measure = { workspace = true }
@@ -62,12 +66,8 @@ serial_test = { workspace = true }
 solana-runtime = { workspace = true, features = ["dev-context-only-utils"] }
 test-case = { 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",
     "solana-bloom/frozen-abi",

+ 0 - 1
gossip/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
gossip/src/contact_info.rs

@@ -625,7 +625,7 @@ pub(crate) fn get_quic_socket(socket: &SocketAddr) -> Result<SocketAddr, Error>
     ))
 }
 
-#[cfg(all(test, RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(all(test, feature = "frozen-abi"))]
 impl solana_frozen_abi::abi_example::AbiExample for ContactInfo {
     fn example() -> Self {
         Self {

+ 1 - 1
gossip/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 
 pub mod cluster_info;

+ 6 - 6
ledger/Cargo.toml

@@ -46,8 +46,12 @@ solana-bpf-loader-program = { workspace = true }
 solana-cost-model = { workspace = true }
 solana-entry = { workspace = true }
 solana-feature-set = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-measure = { workspace = true }
 solana-metrics = { workspace = true }
 solana-perf = { workspace = true }
@@ -90,13 +94,9 @@ solana-runtime = { workspace = true, features = ["dev-context-only-utils"] }
 spl-pod = { workspace = true }
 test-case = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 dev-context-only-utils = []
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "solana-runtime/frozen-abi",

+ 0 - 1
ledger/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
ledger/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 #![recursion_limit = "2048"]
 

+ 6 - 8
perf/Cargo.toml

@@ -21,8 +21,12 @@ log = { workspace = true }
 rand = { workspace = true }
 rayon = { workspace = true }
 serde = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-metrics = { workspace = true }
 solana-rayon-threadlimit = { workspace = true }
 solana-sdk = { workspace = true }
@@ -43,12 +47,8 @@ rand_chacha = { workspace = true }
 solana-logger = { workspace = true }
 test-case = { 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",
     "solana-sdk/frozen-abi",
@@ -70,6 +70,4 @@ level = "warn"
 check-cfg = [
     'cfg(build_target_feature_avx)',
     'cfg(build_target_feature_avx2)',
-    'cfg(RUSTC_WITH_SPECIALIZATION)',
-    'cfg(RUSTC_WITHOUT_SPECIALIZATION)',
 ]

+ 0 - 24
perf/build.rs

@@ -1,8 +1,3 @@
-#[cfg(feature = "frozen-abi")]
-extern crate rustc_version;
-#[cfg(feature = "frozen-abi")]
-use rustc_version::{version_meta, Channel};
-
 fn main() {
     #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
     {
@@ -13,23 +8,4 @@ fn main() {
             println!("cargo:rustc-cfg=build_target_feature_avx2");
         }
     }
-
-    // Copied and adapted from
-    // https://github.com/Kimundi/rustc-version-rs/blob/1d692a965f4e48a8cb72e82cda953107c0d22f47/README.md#example
-    // Licensed under Apache-2.0 + MIT
-    #[cfg(feature = "frozen-abi")]
-    match version_meta().unwrap().channel {
-        Channel::Stable => {
-            println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION");
-        }
-        Channel::Beta => {
-            println!("cargo:rustc-cfg=RUSTC_WITHOUT_SPECIALIZATION");
-        }
-        Channel::Nightly => {
-            println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION");
-        }
-        Channel::Dev => {
-            println!("cargo:rustc-cfg=RUSTC_WITH_SPECIALIZATION");
-        }
-    }
 }

+ 1 - 1
perf/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 pub mod cuda_runtime;
 pub mod data_budget;
 pub mod deduper;

+ 1 - 1
perf/src/recycler.rs

@@ -57,7 +57,7 @@ impl<T: Default> Default for RecyclerX<T> {
     }
 }
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl solana_frozen_abi::abi_example::AbiExample
     for RecyclerX<crate::cuda_runtime::PinnedVec<solana_sdk::packet::Packet>>
 {

+ 6 - 6
program-runtime/Cargo.toml

@@ -23,8 +23,12 @@ rand = { workspace = true }
 serde = { workspace = true }
 solana-compute-budget = { workspace = true }
 solana-feature-set = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-log-collector = { workspace = true }
 solana-measure = { workspace = true }
 solana-metrics = { workspace = true }
@@ -48,12 +52,8 @@ name = "solana_program_runtime"
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "solana-compute-budget/frozen-abi",

+ 0 - 1
program-runtime/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
program-runtime/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![deny(clippy::arithmetic_side_effects)]
 #![deny(clippy::indexing_slicing)]
 

+ 2 - 2
program-runtime/src/loaded_programs.rs

@@ -1347,7 +1347,7 @@ impl<FG: ForkGraph> ProgramCache<FG> {
     }
 }
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl solana_frozen_abi::abi_example::AbiExample for ProgramCacheEntry {
     fn example() -> Self {
         // ProgramCacheEntry isn't serializable by definition.
@@ -1355,7 +1355,7 @@ impl solana_frozen_abi::abi_example::AbiExample for ProgramCacheEntry {
     }
 }
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl<FG: ForkGraph> solana_frozen_abi::abi_example::AbiExample for ProgramCache<FG> {
     fn example() -> Self {
         // ProgramCache isn't serializable by definition.

+ 1 - 1
program-runtime/src/sysvar_cache.rs

@@ -16,7 +16,7 @@ use {
     solana_type_overrides::sync::Arc,
 };
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl ::solana_frozen_abi::abi_example::AbiExample for SysvarCache {
     fn example() -> Self {
         // SysvarCache is not Serialize so just rely on Default.

+ 0 - 3
programs/address-lookup-table/Cargo.toml

@@ -24,9 +24,6 @@ solana-log-collector = { workspace = true }
 solana-program-runtime = { workspace = true }
 solana-sdk = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [lib]
 crate-type = ["lib"]
 name = "solana_address_lookup_table_program"

+ 0 - 1
programs/address-lookup-table/build.rs

@@ -1 +0,0 @@
-../../frozen-abi/build.rs

+ 1 - 1
programs/address-lookup-table/src/lib.rs

@@ -1,5 +1,5 @@
 #![allow(incomplete_features)]
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(specialization))]
 
 #[cfg(not(target_os = "solana"))]
 pub mod processor;

+ 0 - 3
programs/stake-tests/Cargo.toml

@@ -20,8 +20,5 @@ solana-sdk = { workspace = true }
 solana-vote-program = { workspace = true }
 test-case = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]

+ 0 - 3
programs/stake/Cargo.toml

@@ -27,9 +27,6 @@ solana-compute-budget = { workspace = true }
 solana-logger = { workspace = true }
 test-case = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [lib]
 crate-type = ["lib"]
 name = "solana_stake_program"

+ 0 - 1
programs/stake/build.rs

@@ -1 +0,0 @@
-../../frozen-abi/build.rs

+ 1 - 1
programs/stake/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 #[deprecated(
     since = "1.8.0",

+ 6 - 6
programs/vote/Cargo.toml

@@ -17,8 +17,12 @@ num-traits = { workspace = true }
 serde = { workspace = true }
 serde_derive = { workspace = true }
 solana-feature-set = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-metrics = { workspace = true }
 solana-program = { workspace = true }
 solana-program-runtime = { workspace = true }
@@ -30,9 +34,6 @@ assert_matches = { workspace = true }
 solana-logger = { workspace = true }
 test-case = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [lib]
 crate-type = ["lib"]
 name = "solana_vote_program"
@@ -42,7 +43,6 @@ targets = ["x86_64-unknown-linux-gnu"]
 
 [features]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "solana-program/frozen-abi",

+ 0 - 1
programs/vote/build.rs

@@ -1 +0,0 @@
-../../frozen-abi/build.rs

+ 1 - 1
programs/vote/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 
 pub mod vote_processor;
 pub mod vote_state;

+ 0 - 3
runtime-transaction/Cargo.toml

@@ -31,9 +31,6 @@ solana-program = { workspace = true }
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [[bench]]
 name = "process_compute_budget_instructions"
 harness = false

+ 0 - 1
runtime-transaction/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
runtime-transaction/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 
 mod compute_budget_instruction_details;

+ 6 - 6
runtime/Cargo.toml

@@ -56,8 +56,12 @@ solana-config-program = { workspace = true }
 solana-cost-model = { workspace = true }
 solana-feature-set = { workspace = true }
 solana-fee = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-inline-spl = { workspace = true }
 solana-loader-v4-program = { workspace = true }
 solana-measure = { workspace = true }
@@ -113,13 +117,9 @@ test-case = { workspace = true }
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 dev-context-only-utils = ["solana-svm/dev-context-only-utils"]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "solana-accounts-db/frozen-abi",

+ 0 - 1
runtime/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
runtime/src/bank/serde_snapshot.rs

@@ -502,7 +502,7 @@ mod tests {
         assert_eq!(dbank.epoch_reward_status, EpochRewardStatus::Inactive);
     }
 
-    #[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+    #[cfg(feature = "frozen-abi")]
     mod test_bank_serialize {
         use {
             super::*,

+ 1 - 1
runtime/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 
 #[macro_use]

+ 2 - 2
runtime/src/serde_snapshot.rs

@@ -283,7 +283,7 @@ impl From<BankFieldsToSerialize> for SerializableVersionedBank {
     }
 }
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl solana_frozen_abi::abi_example::TransparentAsHelper for SerializableVersionedBank {}
 
 /// Helper type to wrap BufReader streams when deserializing and reconstructing from either just a
@@ -817,7 +817,7 @@ impl<'a> Serialize for SerializableAccountsDb<'a> {
     }
 }
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl<'a> solana_frozen_abi::abi_example::TransparentAsHelper for SerializableAccountsDb<'a> {}
 
 #[allow(clippy::too_many_arguments)]

+ 1 - 1
runtime/src/serde_snapshot/storage.rs

@@ -36,5 +36,5 @@ impl From<&AccountStorageEntry> for SerializableAccountStorageEntry {
     }
 }
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl solana_frozen_abi::abi_example::TransparentAsHelper for SerializableAccountStorageEntry {}

+ 4 - 4
runtime/src/serde_snapshot/utils.rs

@@ -2,7 +2,7 @@ use serde::{
     ser::{SerializeSeq, SerializeTuple},
     Serialize, Serializer,
 };
-#[cfg(all(test, RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(all(test, feature = "frozen-abi"))]
 use solana_frozen_abi::abi_example::TransparentAsHelper;
 
 // consumes an iterator and returns an object that will serialize as a serde seq
@@ -17,7 +17,7 @@ where
         iter: std::cell::RefCell<Option<I>>,
     }
 
-    #[cfg(all(test, RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+    #[cfg(all(test, feature = "frozen-abi"))]
     impl<I> TransparentAsHelper for SerializableSequencedIterator<I> {}
 
     impl<I> Serialize for SerializableSequencedIterator<I>
@@ -56,7 +56,7 @@ where
         iter: std::cell::RefCell<Option<I>>,
     }
 
-    #[cfg(all(test, RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+    #[cfg(all(test, feature = "frozen-abi"))]
     impl<I> TransparentAsHelper for SerializableSequencedIterator<I> {}
 
     impl<I> Serialize for SerializableSequencedIterator<I>
@@ -95,7 +95,7 @@ where
         iter: std::cell::RefCell<Option<I>>,
     }
 
-    #[cfg(all(test, RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+    #[cfg(all(test, feature = "frozen-abi"))]
     impl<I> TransparentAsHelper for SerializableMappedIterator<I> {}
 
     impl<K, V, I> Serialize for SerializableMappedIterator<I>

+ 2 - 2
runtime/src/stake_account.rs

@@ -1,4 +1,4 @@
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 use solana_frozen_abi::abi_example::AbiExample;
 use {
     solana_sdk::{
@@ -98,7 +98,7 @@ impl<S, T> PartialEq<StakeAccount<S>> for StakeAccount<T> {
     }
 }
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl AbiExample for StakeAccount<Delegation> {
     fn example() -> Self {
         use solana_sdk::{

+ 6 - 6
sdk/Cargo.toml

@@ -37,7 +37,6 @@ full = [
 borsh = ["dep:borsh", "solana-program/borsh", "solana-secp256k1-recover/borsh"]
 dev-context-only-utils = ["qualifier_attr"]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "solana-feature-set/frozen-abi",
@@ -88,8 +87,12 @@ solana-bn254 = { workspace = true }
 solana-decode-error = { workspace = true }
 solana-derivation-path = { workspace = true }
 solana-feature-set = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-program = { workspace = true }
 solana-program-memory = { workspace = true }
 solana-sanitize = { workspace = true }
@@ -121,9 +124,6 @@ solana-sdk = { path = ".", features = ["dev-context-only-utils"] }
 static_assertions = { workspace = true }
 tiny-bip39 = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 

+ 0 - 1
sdk/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 6 - 6
sdk/feature-set/Cargo.toml

@@ -11,16 +11,16 @@ edition = { workspace = true }
 
 [dependencies]
 lazy_static = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 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",
 ]

+ 0 - 1
sdk/feature-set/build.rs

@@ -1 +0,0 @@
-../../frozen-abi/build.rs

+ 1 - 1
sdk/feature-set/src/lib.rs

@@ -17,7 +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))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 
 use {
     lazy_static::lazy_static,

+ 6 - 6
sdk/hash/Cargo.toml

@@ -20,8 +20,12 @@ bytemuck_derive = { workspace = true, optional = true }
 serde = { workspace = true, optional = true }
 serde_derive = { workspace = true, optional = true }
 solana-atomic-u64 = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-sanitize = { workspace = true }
 
 [dev-dependencies]
@@ -31,16 +35,12 @@ solana-hash = { path = ".", features = ["dev-context-only-utils"] }
 js-sys = { workspace = true }
 wasm-bindgen = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 borsh = ["dep:borsh", "std"]
 bytemuck = ["dep:bytemuck", "dep:bytemuck_derive"]
 default = ["std"]
 dev-context-only-utils = ["bs58/alloc"]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "std"

+ 0 - 1
sdk/hash/build.rs

@@ -1 +0,0 @@
-../../frozen-abi/build.rs

+ 1 - 1
sdk/hash/src/lib.rs

@@ -1,5 +1,5 @@
 #![no_std]
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #[cfg(feature = "borsh")]
 use borsh::{BorshDeserialize, BorshSchema, BorshSerialize};
 #[cfg(any(feature = "std", target_arch = "wasm32"))]

+ 0 - 4
sdk/instruction/Cargo.toml

@@ -30,15 +30,11 @@ wasm-bindgen = { workspace = true }
 [dev-dependencies]
 solana-instruction = { path = ".", features = ["borsh"] }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 bincode = ["dep:bincode", "dep:serde"]
 borsh = ["dep:borsh"]
 default = ["std"]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "serde",

+ 0 - 1
sdk/instruction/build.rs

@@ -1 +0,0 @@
-../../frozen-abi/build.rs

+ 1 - 1
sdk/instruction/src/lib.rs

@@ -10,7 +10,7 @@
 //! while executing a given instruction is also included in `Instruction`, as
 //! [`AccountMeta`] values. The runtime uses this information to efficiently
 //! schedule execution of transactions.
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 #![no_std]
 

+ 0 - 4
sdk/program/Cargo.toml

@@ -102,9 +102,6 @@ solana-pubkey = { workspace = true, features = ["dev-context-only-utils"] }
 static_assertions = { workspace = true }
 test-case = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 
@@ -123,7 +120,6 @@ borsh = [
 ]
 dev-context-only-utils = ["dep:qualifier_attr"]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "solana-hash/frozen-abi",

+ 0 - 1
sdk/program/build.rs

@@ -1 +0,0 @@
-../../frozen-abi/build.rs

+ 1 - 1
sdk/program/src/lib.rs

@@ -464,7 +464,7 @@
 //! [lut]: https://docs.solanalabs.com/proposals/versioned-transactions
 
 #![allow(incomplete_features)]
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(specialization))]
 
 // Allows macro expansion of `use ::solana_program::*` to work within this crate
 extern crate self as solana_program;

+ 6 - 6
sdk/pubkey/Cargo.toml

@@ -21,8 +21,12 @@ serde = { workspace = true, optional = true }
 serde_derive = { workspace = true, optional = true }
 solana-atomic-u64 = { workspace = true }
 solana-decode-error = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-sanitize = { workspace = true }
 
 [target.'cfg(target_os = "solana")'.dependencies]
@@ -55,9 +59,6 @@ solana-pubkey = { path = ".", features = [
 strum = { workspace = true }
 strum_macros = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 borsh = ["dep:borsh", "dep:borsh0-10", "std"]
 bytemuck = ["dep:bytemuck", "dep:bytemuck_derive"]
@@ -65,7 +66,6 @@ curve25519 = ["dep:curve25519-dalek", "sha2"]
 default = ["std"]
 dev-context-only-utils = ["dep:arbitrary", "std"]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro"
 ]

+ 0 - 1
sdk/pubkey/build.rs

@@ -1 +0,0 @@
-../../frozen-abi/build.rs

+ 1 - 1
sdk/pubkey/src/lib.rs

@@ -1,6 +1,6 @@
 //! Solana account addresses.
 #![no_std]
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 
 #[cfg(any(feature = "std", target_arch = "wasm32"))]

+ 6 - 6
sdk/signature/Cargo.toml

@@ -16,8 +16,12 @@ generic-array = { workspace = true, features = ["more_lengths"] }
 rand = { workspace = true, optional = true }
 serde = { workspace = true, optional = true }
 serde_derive = { workspace = true, optional = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-sanitize = { workspace = true }
 
 [dev-dependencies]
@@ -25,13 +29,9 @@ curve25519-dalek = { workspace = true }
 ed25519-dalek = { workspace = true }
 solana-program = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 default = ["std"]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "std"

+ 0 - 1
sdk/signature/build.rs

@@ -1 +0,0 @@
-../../frozen-abi/build.rs

+ 1 - 1
sdk/signature/src/lib.rs

@@ -1,6 +1,6 @@
 //! 64-byte signature type.
 #![no_std]
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #[cfg(any(test, feature = "verify"))]
 use core::convert::TryInto;
 #[cfg(feature = "serde")]

+ 1 - 1
sdk/src/fee.rs

@@ -215,7 +215,7 @@ impl Default for FeeStructure {
     }
 }
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl ::solana_frozen_abi::abi_example::AbiExample for FeeStructure {
     fn example() -> Self {
         FeeStructure::default()

+ 1 - 1
sdk/src/lib.rs

@@ -30,7 +30,7 @@
 //! [`clap`]: https://docs.rs/clap
 
 #![allow(incomplete_features)]
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(specialization))]
 
 // Allows macro expansion of `use ::solana_sdk::*` to work within this crate
 extern crate self as solana_sdk;

+ 3 - 3
sdk/src/packet.rs

@@ -50,17 +50,17 @@ pub struct Meta {
     pub flags: PacketFlags,
 }
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl ::solana_frozen_abi::abi_example::AbiExample for PacketFlags {
     fn example() -> Self {
         Self::empty()
     }
 }
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl ::solana_frozen_abi::abi_example::TransparentAsHelper for PacketFlags {}
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl ::solana_frozen_abi::abi_example::EvenAsOpaque for PacketFlags {
     const TYPE_NAME_MATCHER: &'static str = "::_::InternalBitFlags";
 }

+ 1 - 1
sdk/src/reserved_account_keys.rs

@@ -27,7 +27,7 @@ mod zk_elgamal_proof_program {
 
 // ReservedAccountKeys is not serialized into or deserialized from bank
 // snapshots but the bank requires this trait to be implemented anyways.
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl ::solana_frozen_abi::abi_example::AbiExample for ReservedAccountKeys {
     fn example() -> Self {
         // ReservedAccountKeys is not Serialize so just rely on Default.

+ 7 - 6
short-vec/Cargo.toml

@@ -9,13 +9,14 @@ homepage = { workspace = true }
 license = { workspace = true }
 edition = { workspace = true }
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [dependencies]
 serde = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 
 [dev-dependencies]
 assert_matches = { workspace = true }
@@ -23,7 +24,7 @@ bincode = { workspace = true }
 serde_json = { workspace = true }
 
 [features]
-frozen-abi = ["dep:rustc_version", "dep:solana-frozen-abi", "dep:solana-frozen-abi-macro"]
+frozen-abi = ["dep:solana-frozen-abi", "dep:solana-frozen-abi-macro"]
 
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]

+ 0 - 1
short-vec/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
short-vec/src/lib.rs

@@ -1,5 +1,5 @@
 //! Compact serde-encoding of vectors with small length.
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 #[cfg(feature = "frozen-abi")]
 use solana_frozen_abi_macro::AbiExample;

+ 6 - 6
svm/Cargo.toml

@@ -20,8 +20,12 @@ solana-bpf-loader-program = { workspace = true }
 solana-compute-budget = { workspace = true }
 solana-feature-set = { workspace = true }
 solana-fee = { workspace = true }
-solana-frozen-abi = { workspace = true, optional = true }
-solana-frozen-abi-macro = { workspace = true, optional = true }
+solana-frozen-abi = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
+solana-frozen-abi-macro = { workspace = true, optional = true, features = [
+    "frozen-abi",
+] }
 solana-loader-v4-program = { workspace = true }
 solana-log-collector = { workspace = true }
 solana-measure = { workspace = true }
@@ -60,13 +64,9 @@ test-case = { workspace = true }
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 
-[build-dependencies]
-rustc_version = { workspace = true, optional = true }
-
 [features]
 dev-context-only-utils = ["dep:qualifier_attr"]
 frozen-abi = [
-    "dep:rustc_version",
     "dep:solana-frozen-abi",
     "dep:solana-frozen-abi-macro",
     "solana-compute-budget/frozen-abi",

+ 0 - 1
svm/build.rs

@@ -1 +0,0 @@
-../frozen-abi/build.rs

+ 1 - 1
svm/src/lib.rs

@@ -1,4 +1,4 @@
-#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
+#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
 #![allow(clippy::arithmetic_side_effects)]
 
 pub mod account_loader;

+ 1 - 1
svm/src/message_processor.rs

@@ -16,7 +16,7 @@ use {
 #[derive(Debug, Default, Clone, serde_derive::Deserialize, serde_derive::Serialize)]
 pub struct MessageProcessor {}
 
-#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
+#[cfg(feature = "frozen-abi")]
 impl ::solana_frozen_abi::abi_example::AbiExample for MessageProcessor {
     fn example() -> Self {
         // MessageProcessor's fields are #[serde(skip)]-ed and not Serialize

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است