| Crates.io | trezoa-frozen-abi-macro |
| lib.rs | trezoa-frozen-abi-macro |
| version | 3.2.3 |
| created_at | 2025-10-23 15:33:07.485698+00 |
| updated_at | 2025-11-14 21:10:18.266886+00 |
| description | Trezoa Frozen ABI Macro |
| homepage | https://trezoa.xyz/ |
| repository | https://github.com/Trezoa-team/trezoa-frozen-abi-macro |
| max_upload_size | |
| id | 1897261 |
| size | 38,307 |
A procedural macro crate for generating frozen ABI (Application Binary Interface) implementations in the Trezoa blockchain ecosystem.
This crate provides procedural macros for generating stable ABI representations of Rust types, ensuring compatibility across different versions of Trezoa blockchain software. It's a core component of Trezoa's serialization and deserialization infrastructure.
Add this to your Cargo.toml:
[dependencies]
trezoa-frozen-abi-macro = "3.2.3"
use trezoa_frozen_abi_macro::{frozen_abi, AbiExample, AbiEnumVisitor};
#[derive(AbiExample, AbiEnumVisitor)]
#[frozen_abi(digest = "your_digest_hash_here")]
pub struct MyStruct {
pub field1: u64,
pub field2: String,
}
#[derive(AbiExample, AbiEnumVisitor)]
#[frozen_abi(digest = "your_digest_hash_here")]
pub enum MyEnum {
Variant1,
Variant2(u32),
Variant3 { value: i64 },
}
#[frozen_abi(digest = "...")] - Generates frozen ABI implementation with digest verification#[derive(AbiExample)] - Generates example instances for testing#[derive(AbiEnumVisitor)] - Generates ABI visitor for enumsThis crate is a migration from solana-frozen-abi-macro v1.18.26 to the Trezoa ecosystem:
Replace in your Cargo.toml:
# Old
solana-frozen-abi-macro = "1.18.26"
# New
trezoa-frozen-abi-macro = "3.2.3"
Update imports in your code:
// Old
use solana_frozen_abi_macro::{frozen_abi, AbiExample};
// New
use trezoa_frozen_abi_macro::{frozen_abi, AbiExample};
TREZOA_ABI_BULK_UPDATE - Skip ABI digest verification during bulk updatesTREZOA_ABI_DUMP_DIR - Directory for dumping ABI differences during testinggit clone https://github.com/Trezoa-team/trezoa-frozen-abi-macro.git
cd trezoa-frozen-abi-macro
cargo build
cargo test
cargo check
We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
cargo fmt)This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
This crate is based on the original solana-frozen-abi-macro developed by Solana Labs. We gratefully acknowledge their work and maintain this as a compatible fork for the Trezoa ecosystem.
Maintained by: Trezoa-team
License: Apache 2.0
Version: 3.2.3