Skip to content

Commit

Permalink
instruction: Derive everything for wasm build (#3606)
Browse files Browse the repository at this point in the history
#### Problem

As noticed in
solana-labs/solana-program-library#7489, the
wasm build for `Instruction` doesn't contain `Clone`. This is because we
missed the derivations for the wasm version of `Instruction` in
#1658.

#### Summary of changes

Looking back through that PR, I noticed that we only missed those
additional derives on `Instruction`, so just fix those in `Instruction`.

Since this is fixing a small regression for wasm builds, I think we
should backport the change to v2.1.

(cherry picked from commit d3bce9f)
  • Loading branch information
joncinque authored and mergify[bot] committed Nov 13, 2024
1 parent 2d03f7e commit 86d84ec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sdk/instruction/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ pub struct Instruction {
/// is fixed. This must not diverge from the regular non-wasm Instruction struct.
#[cfg(all(feature = "std", target_arch = "wasm32"))]
#[wasm_bindgen::prelude::wasm_bindgen]
#[cfg_attr(
feature = "serde",
derive(serde_derive::Serialize, serde_derive::Deserialize)
)]
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct Instruction {
#[wasm_bindgen(skip)]
pub program_id: Pubkey,
Expand Down

0 comments on commit 86d84ec

Please sign in to comment.