#![allow(clippy::all)]
#![allow(dead_code)]
macro_rules! _ic0_module_ret {
( ( $_: ident : $t: ty ) ) => {
$t
};
( ( $_i1: ident : $t1: ty , $_i2: ident : $t2: ty) ) => {
($t1, $t2)
};
( ( $t: ty ) ) => {
$t
};
( $t: ty ) => {
$t
};
}
macro_rules! ic0_module {
( $( ic0. $name: ident : ( $( $argname: ident : $argtype: ty ),* ) -> $rettype: tt ; )+ ) => {
#[allow(improper_ctypes)]
#[cfg(target_arch = "wasm32")]
#[link(wasm_import_module = "ic0")]
extern "C" {
$(pub(super) fn $name($( $argname: $argtype, )*) -> _ic0_module_ret!($rettype) ;)*
}
$(
#[cfg(not(target_arch = "wasm32"))]
pub(super) unsafe fn $name($( $argname: $argtype, )*) -> _ic0_module_ret!($rettype) {
let _ = ( $( $argname, )* ); panic!("{} should only be called inside canisters.", stringify!( $name ));
}
)*
};
}
ic0_module! {
ic0.msg_arg_data_size : () -> i32; ic0.msg_arg_data_copy : (dst : i32, offset : i32, size : i32) -> (); ic0.msg_caller_size : () -> i32; ic0.msg_caller_copy : (dst : i32, offset: i32, size : i32) -> (); ic0.msg_reject_code : () -> i32; ic0.msg_reject_msg_size : () -> i32; ic0.msg_reject_msg_copy : (dst : i32, offset : i32, size : i32) -> ();
ic0.msg_reply_data_append : (src : i32, size : i32) -> (); ic0.msg_reply : () -> (); ic0.msg_reject : (src : i32, size : i32) -> ();
ic0.msg_cycles_available : () -> i64; ic0.msg_cycles_available128 : (dst : i32) -> (); ic0.msg_cycles_refunded : () -> i64; ic0.msg_cycles_refunded128 : (dst : i32) -> (); ic0.msg_cycles_accept : ( max_amount : i64) -> ( amount : i64 ); ic0.msg_cycles_accept128 : ( max_amount_high : i64, max_amount_low: i64, dst : i32)
-> ();
ic0.canister_self_size : () -> i32; ic0.canister_self_copy : (dst : i32, offset : i32, size : i32) -> (); ic0.canister_cycle_balance : () -> i64; ic0.canister_cycle_balance128 : (dst : i32) -> (); ic0.canister_status : () -> i32;
ic0.msg_method_name_size : () -> i32; ic0.msg_method_name_copy : (dst : i32, offset : i32, size : i32) -> (); ic0.accept_message : () -> ();
ic0.call_new : ( callee_src : i32,
callee_size : i32,
name_src : i32,
name_size : i32,
reply_fun : i32,
reply_env : i32,
reject_fun : i32,
reject_env : i32
) -> ();
ic0.call_on_cleanup : (fun : i32, env : i32) -> (); ic0.call_data_append : (src : i32, size : i32) -> (); ic0.call_cycles_add : ( amount : i64 ) -> (); ic0.call_cycles_add128 : ( amount_high : i64, amount_low: i64 ) -> (); ic0.call_perform : () -> ( err_code : i32 );
ic0.stable_size : () -> (page_count : i32); ic0.stable_grow : (new_pages : i32) -> (old_page_count : i32); ic0.stable_write : (offset : i32, src : i32, size : i32) -> (); ic0.stable_read : (dst : i32, offset : i32, size : i32) -> (); ic0.stable64_size : () -> (page_count : i64); ic0.stable64_grow : (new_pages : i64) -> (old_page_count : i64); ic0.stable64_write : (offset : i64, src : i64, size : i64) -> (); ic0.stable64_read : (dst : i64, offset : i64, size : i64) -> ();
ic0.certified_data_set : (src: i32, size: i32) -> (); ic0.data_certificate_present : () -> i32; ic0.data_certificate_size : () -> i32; ic0.data_certificate_copy : (dst: i32, offset: i32, size: i32) -> ();
ic0.time : () -> (timestamp : i64); ic0.performance_counter : () -> (counter : i64);
ic0.debug_print : (src : i32, size : i32) -> (); ic0.trap : (src : i32, size : i32) -> (); }