#solana #serialization #serde #classic #define #converter

solana_idl

Rust Solana Classic IDL types definitions de/serializable with serde and converter

6 releases

0.2.0 Jul 17, 2024
0.1.0 Jun 19, 2024
0.0.4 Jul 28, 2023
0.0.3 Jun 2, 2023
0.0.1 Jan 22, 2023

#26 in #classic

Download history 34/week @ 2025-04-05 16/week @ 2025-04-12 151/week @ 2025-04-19 123/week @ 2025-04-26 154/week @ 2025-05-03 126/week @ 2025-05-10 40/week @ 2025-05-17 105/week @ 2025-05-24 143/week @ 2025-05-31 110/week @ 2025-06-07 129/week @ 2025-06-14 150/week @ 2025-06-21 127/week @ 2025-06-28 85/week @ 2025-07-05 149/week @ 2025-07-12 197/week @ 2025-07-19

569 downloads per month
Used in 6 crates (4 directly)

MIT license

37KB
773 lines

solana-idl

Extracts Rust Solana IDL types definitions de/serializable with serde extracted from shank or anchor.

Handles multiple IDL versions to provide the classic IDL structure.

Example

use solana_idl::try_extract_classic_idl;
let idl_json = // read JSON from somewhere
let classic_idl = try_extract_classic_idl(idl_json).unwrap();

// If you want to save the classic IDL to a file to upload, etc. do the below
let classic_idl_json = serde_json::to_string(&classic_idl).unwrap();

LICENSE

MIT

Dependencies

~0.8–1.7MB
~35K SLoC