Crates.io | loam-sdk-macro |
lib.rs | loam-sdk-macro |
version | 0.8.5 |
source | src |
created_at | 2023-08-31 18:44:23.670814 |
updated_at | 2024-09-30 13:04:56.196414 |
description | Macros needed by loam-sdk |
homepage | |
repository | https://github.com/loambuild/loam/tree/main/crates/loam-sdk-macro |
max_upload_size | |
id | 960293 |
size | 32,339 |
This crate contains the source for the macros that all subcontracts depend on, such as the #[subcontract]
macro itself. Rust macros generate code, allowing users to write less. These macros generate the code necessary for all Subcontracts, and do so in a way that makes it easy to author your own Subcontracts.
#[subcontract]
is an attribute procedural macro (proc macro) that you need when you create your own subcontracts.
Aside from #[subcontract]
, this crate also contains the implementation for some derive macros such as IntoKey
, which structs in the subcontract need to derive in order to lazily load and store their state on the blockchain.
For more information about how to use and author Subcontracts, see the loam-sdk README.
See lib.rs for the implementations of subcontract
, IntoKey
, and other macros.