Crate ic0

Source
Expand description

Bindings to the Internet Computer system API.

The raw bindings can be found in the sys module. The functions in the crate root provide slightly higher-level bindings in terms of slices instead of pointers/lengths, accurately typed pointers, etc., but otherwise does not adapt the API. Where this is all that is needed for the functions to be safe, they are marked as safe, but function pointers cannot be made safe and as such call_new is still unsafe.

Any function ic0.foo that would write to a user buffer has two versions, foo which takes &mut [u8] and foo_uninit which takes &mut [MaybeUninit<u8>].

Modules§

sys

Functions§

accept_message
call_cycles_add128
call_data_append
call_new
Safety
call_new_oneway
call_on_cleanup
Safety
call_perform
Safety
call_with_best_effort_response
canister_cycle_balance128
canister_liquid_cycle_balance128
canister_self_copy
canister_self_size
canister_status
canister_version
certified_data_set
cost_call
cost_create_canister
cost_http_request
cost_sign_with_ecdsa
cost_sign_with_schnorr
cost_vetkd_derive_key
cycles_burn128
data_certificate_copy
data_certificate_copy_uninit
Safety
data_certificate_present
data_certificate_size
debug_print
global_timer_set
in_replicated_execution
is_controller
msg_arg_data_copy
msg_arg_data_copy_uninit
Safety
msg_arg_data_size
msg_caller_copy
msg_caller_copy_uninit
Safety
msg_caller_size
msg_cycles_accept128
msg_cycles_available128
msg_cycles_refunded128
msg_deadline
msg_method_name_copy
msg_method_name_copy_uninit
Safety
msg_method_name_size
msg_reject
msg_reject_code
msg_reject_msg_copy
msg_reject_msg_copy_uninit
Safety
msg_reject_msg_size
msg_reply
msg_reply_data_append
performance_counter
root_key_copy
root_key_copy_uninit
Safety
root_key_size
stable64_grow
stable64_read
stable64_read_uninit
Safety
stable64_size
stable64_write
subnet_self_copy
subnet_self_copy_uninit
Safety
subnet_self_size
time
trap