#dfinity #internet-computer #canister #ic #subcanister #proc-macro

macro bity-ic-candid-gen

Description spécifique de la crate

1 unstable release

new 0.1.0 Mar 14, 2025

#12 in #subcanister

MIT license

8KB
64 lines

Procedural macros for generating Candid method implementations.

This module provides procedural macros to generate boilerplate code for Candid method implementations in Internet Computer canisters. It supports both query and update methods, with and without arguments.

Features

  • Generation of Candid method implementations
  • Support for query and update methods
  • Support for methods with and without arguments
  • Automatic type generation for Args and Response

Examples

use bity_dfinity_library::candid_gen::*;

// Generate a method with arguments
generate_candid_method!(my_canister, transfer, update);

// Generate a method without arguments
generate_candid_method_no_args!(my_canister, get_balance, query);

Dependencies

~205–640KB
~15K SLoC