#collection #macro #znap #action #build #solana

macro znap-macros

Collection of macros to build znap collections

36 releases

0.1.37 Aug 31, 2024
0.1.36 Aug 29, 2024
0.1.31 Jul 26, 2024
0.1.19 Jun 29, 2024

#3 in #znap

Download history 597/week @ 2024-06-21 774/week @ 2024-06-28 1186/week @ 2024-07-05 82/week @ 2024-07-12 420/week @ 2024-07-26 239/week @ 2024-08-02 15/week @ 2024-08-09 4/week @ 2024-08-16 85/week @ 2024-08-23 190/week @ 2024-08-30 7/week @ 2024-09-06 54/week @ 2024-09-13 31/week @ 2024-09-20 34/week @ 2024-09-27 6/week @ 2024-10-04

125 downloads per month
Used in znap

Apache-2.0

48KB
1K SLoC

znap-macros

Macro collection for creating Solana actions

The znap-macros module is a collection of macros designed to facilitate metaprogramming in Rust. This module relies on znap-syn for code parsing and generation, allowing developers to dynamically and efficiently manipulate and extend code.

Macros in Rust allow reading the current code and adding extra code, which is essential for automatic generation of functions, structures and other entities. znap-macros uses the znap-syn capability to parse the source code and transform it into manipulable objects, applying specific logic and then generating the necessary code.

Solana Actions Macros

Macros in znap-macros allow you to transform Rust code snippets into znap-syn-defined objects such as CollectionMod, ActionStruct, QueryStruct and ErrorEnum. These macros facilitate the creation and manipulation of these objects to generate Solana actions.

Package

Package Description Version Docs
znap-macros Macro collection for creating Solana actions Crates.io Docs.rs

Dependencies

~3–13MB
~109K SLoC