| Crates.io | drift-idl-gen |
| lib.rs | drift-idl-gen |
| version | 0.2.0 |
| created_at | 2024-09-28 01:24:44.711359+00 |
| updated_at | 2025-03-21 05:42:58.871321+00 |
| description | Generates Drift v2 structs/types from anchor IDL |
| homepage | |
| repository | https://github.com/drift-labs/drift-rs |
| max_upload_size | |
| id | 1389665 |
| size | 33,850 |
⚠️ for drift-rs there's no need to run this manually. The build.rs script will trigger it.
Generates rust anchor structs from IDL json This is implemented rather than another project for a couple reasons:
#[repr(C)] other IDL generation tools do not provide the ability to market structs with repr(C) which is necessary for ffi functionality throught the drift-rs project.solana_sdk_1.16::Pubkey == solana_sdk_2.x::Pubkey == anchor_lang::solana_sdk::Pubkey
this allows the generated IDL code to ignore the anchor version of crates.