Skip to content

Commit 2181cb4

Browse files
committed
client: deprecate instructions_bincode
1 parent df33b22 commit 2181cb4

File tree

7 files changed

+16
-66
lines changed

7 files changed

+16
-66
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/rust/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ edition = { workspace = true }
1010

1111
[features]
1212
fetch = ["dep:solana-client", "dep:solana-sdk"]
13-
serde = ["dep:bincode", "dep:serde", "kaigan/serde"]
13+
serde = ["dep:bincode", "dep:serde", "kaigan/serde", "solana-config-interface/bincode"]
1414
test-sbf = []
1515

1616
[dependencies]
@@ -19,6 +19,7 @@ borsh = { workspace = true }
1919
kaigan = { workspace = true }
2020
serde = { workspace = true, features = ["derive"], optional = true }
2121
solana-client = { workspace = true, optional = true }
22+
solana-config-interface = { workspace = true, features = ["serde"] }
2223
solana-program = { workspace = true, features = ["borsh"] }
2324
solana-sdk = { workspace = true, optional = true }
2425

clients/rust/src/instructions_bincode.rs

Lines changed: 0 additions & 60 deletions
This file was deleted.

clients/rust/src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
mod generated;
44
mod hooked;
55

6+
#[deprecated(since = "1.0.0", note = "use `solana_config_interface` crate instead")]
67
#[cfg(feature = "serde")]
7-
pub mod instructions_bincode;
8+
pub mod instructions_bincode {
9+
pub use solana_config_interface::{
10+
instruction::{create_account, store},
11+
state::ConfigState,
12+
};
13+
}
814

915
pub use {
1016
generated::{programs::SOLANA_CONFIG_ID as ID, *},

program/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ thiserror = { workspace = true }
2727
[dev-dependencies]
2828
mollusk-svm = { workspace = true, features = ["fuzz-fd"] }
2929
mollusk-svm-bencher = { workspace = true }
30-
solana-config-program-client = { path = "../clients/rust", features = ["serde"] }
30+
solana-config-interface = { workspace = true, features = ["bincode", "serde"] }
3131
solana-sdk = { workspace = true }
3232

3333
[lib]

program/benches/setup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use {
22
mollusk_svm_bencher::Bench,
33
serde::Serialize,
4+
solana_config_interface::{instruction::store, state::ConfigState},
45
solana_config_program::state::ConfigKeys,
5-
solana_config_program_client::instructions_bincode::{store, ConfigState},
66
solana_sdk::{
77
account::Account,
88
hash::Hash,

program/tests/functional.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ use {
55
bincode::serialized_size,
66
mollusk_svm::{result::Check, Mollusk},
77
serde::{Deserialize, Serialize},
8+
solana_config_interface::{
9+
instruction::{self as config_instruction},
10+
state::ConfigState,
11+
},
812
solana_config_program::{error::ConfigError, state::ConfigKeys},
9-
solana_config_program_client::instructions_bincode::{self as config_instruction, ConfigState},
1013
solana_sdk::{
1114
account::Account,
1215
instruction::{AccountMeta, Instruction},

0 commit comments

Comments
 (0)