canic-types

Crates.iocanic-types
lib.rscanic-types
version0.6.19
created_at2025-12-06 17:35:24.391039+00
updated_at2025-12-24 13:44:29.251747+00
descriptionCanic — a canister orchestration and management toolkit for the Internet Computer
homepage
repository
max_upload_size
id1970456
size55,029
(borovan)

documentation

README

canic-types

Shared Canic domain types that are candid-friendly and stable-structures friendly.

This crate centralizes small wrappers so downstream canisters can import a single set of types (either via canic::types::* or canic::core::types::*).

Includes:

  • Cycles – human-friendly parsing/formatting and config decoding helpers for cycle amounts.
  • Decimal – candid-friendly wrapper around rust_decimal::Decimal (encoded as text).
  • BoundedString<N> – length-capped string wrapper implementing stable-structures Storable.
  • WasmModule – wrapper over embedded WASM bytes with hashing helpers.
use canic_types::{BoundedString16, Cycles};

let cycles: Cycles = "5T".parse().unwrap();
let name = BoundedString16::new("tenant".to_string());
Commit count: 0

cargo fmt