29 releases (breaking)

Uses new Rust 2024

0.29.0 Mar 26, 2026
0.27.0 Feb 3, 2026
0.25.0 Aug 26, 2025
0.24.0 Jul 7, 2025
0.2.0 Jul 30, 2021

#28 in #internet-computer-icp

Download history 157/week @ 2026-02-03 103/week @ 2026-02-10 246/week @ 2026-02-17 111/week @ 2026-02-24 192/week @ 2026-03-03 74/week @ 2026-03-10 63/week @ 2026-03-17 122/week @ 2026-03-24 193/week @ 2026-03-31 88/week @ 2026-04-07 206/week @ 2026-04-14 372/week @ 2026-04-21 90/week @ 2026-04-28 14/week @ 2026-05-05 68/week @ 2026-05-12 34/week @ 2026-05-19

230 downloads per month
Used in icx-asset

Apache-2.0

210KB
5K SLoC

ic-asset is a library for manipulating assets in an asset canister.


lib.rs:

A library for manipulating assets in an asset canister.

Example

use ic_agent::agent::Agent;
use ic_agent::identity::BasicIdentity;
use ic_utils::Canister;
use std::time::Duration;
let agent = Agent::builder()
    .with_url(replica_url)
    .with_identity(BasicIdentity::from_pem_file(pemfile)?)
    .build()?;
let canister = Canister::builder()
    .with_canister_id(canister_id)
    .with_agent(&agent)
    .build()?;
let logger = slog::Logger::root(slog::Discard, slog::o!());
ic_asset::sync(&canister, &[concat!(env!("CARGO_MANIFEST_DIR"), "assets/").as_ref()], false, &logger, None).await?;

Dependencies

~46–66MB
~1M SLoC