canic-cdk

Crates.iocanic-cdk
lib.rscanic-cdk
version0.9.10
created_at2025-12-05 15:46:50.397935+00
updated_at2026-01-23 13:33:02.511174+00
descriptionCanic — a canister orchestration and management toolkit for the Internet Computer
homepagehttps://github.com/dragginzgame/canic
repositoryhttps://github.com/dragginzgame/canic
max_upload_size
id1968500
size77,417
(borovan)

documentation

https://docs.rs/canic-cdk

README

canic-cdk

Canic's lightweight wrapper around ic-cdk types and helpers used across the stack.

This crate exists to give Canic (and downstream canisters) a stable import surface:

  • canic::cdk::api and canic::cdk::mgmt re-export ic_cdk APIs.
  • canic::cdk::timers re-exports ic_cdk_timers.
  • canic::cdk::candid re-exports candid.
  • canic::cdk::structures re-exports ic-stable-structures plus a small BTreeMap wrapper.
  • canic::cdk::types provides common IC types (Principal, Nat, Int, Account, …).
  • canic::cdk::utils hosts small WASM-safe helpers like time::now_* and wasm::get_wasm_hash.

Most users should access this crate via canic::cdk (from the facade crate).

Example

use canic::cdk::{api, types::Principal};

#[canic::cdk::update]
fn whoami() -> Principal {
    api::caller()
}

For installation and workspace usage, see ../../README.md.

Commit count: 1337

cargo fmt