dfinity/cdk-rs

Rust canister development kit for the Internet Computer.

Rust

230

403 commits

updated Sep 15, 2026

See the code

README

Rust Canister Development Kit

Documentation Crates.io License Downloads CI

Rust CDK provides tools for building Canisters on Internet Computer (IC).

You may be looking for:

If you are looking for a crate to communicate with existing canisters on IC, you may want to check agent-rs.

Introduction

A canister is a WebAssembly (wasm) module that can run on the Internet Computer.

To be a canister, a wasm module should communicate with the execution environment using Canister interfaces (System API).

This repo provides libraries and tools to facilitate developing canisters in Rust.

  • ic0: Internet Computer System API binding.
  • ic-cdk: Internet Computer Canister Development Kit.
  • ic-cdk-bindgen: Generate Rust bindings from Candid to make inter-canister calls.
  • ic-cdk-macros: Annotate functions with attribute macros to make them exposed public interfaces.
  • ic-cdk-timers: The library implements multiple and periodic timers.
  • ic-certified-map: An implementation of map which support certified queries.
  • ic-ledger-types: Type definitions to communicate with the ICP ledger canister.

Rust CDK in Action

cargo add ic-cdk

In Cargo.toml:

[lib]
crate-type = ["cdylib"]

Then in Rust source code:

#[ic_cdk::query]
fn hello() -> String{
    "world".to_string()
}

Check Rust quickstart for a detailed guidance.

blockchain
canister
cdk
icp
internet-computer
rust
sdk
smart-contract

Contributors

(top 30 of 48)

lwshang

150 commits

adamspofford

77 commits

hansl

37 commits

roman-kashitsyn

27 commits

dfinity/cdk-rs

Rust canister development kit for the Internet Computer.

Rust

230

403 commits

updated Sep 15, 2026

See the code

README

Rust Canister Development Kit

Documentation Crates.io License Downloads CI

Rust CDK provides tools for building Canisters on Internet Computer (IC).

You may be looking for:

If you are looking for a crate to communicate with existing canisters on IC, you may want to check agent-rs.

Introduction

A canister is a WebAssembly (wasm) module that can run on the Internet Computer.

To be a canister, a wasm module should communicate with the execution environment using Canister interfaces (System API).

This repo provides libraries and tools to facilitate developing canisters in Rust.

  • ic0: Internet Computer System API binding.
  • ic-cdk: Internet Computer Canister Development Kit.
  • ic-cdk-bindgen: Generate Rust bindings from Candid to make inter-canister calls.
  • ic-cdk-macros: Annotate functions with attribute macros to make them exposed public interfaces.
  • ic-cdk-timers: The library implements multiple and periodic timers.
  • ic-certified-map: An implementation of map which support certified queries.
  • ic-ledger-types: Type definitions to communicate with the ICP ledger canister.

Rust CDK in Action

cargo add ic-cdk

In Cargo.toml:

[lib]
crate-type = ["cdylib"]

Then in Rust source code:

#[ic_cdk::query]
fn hello() -> String{
    "world".to_string()
}

Check Rust quickstart for a detailed guidance.

blockchain
canister
cdk
icp
internet-computer
rust
sdk
smart-contract

Contributors

(top 30 of 48)

lwshang

150 commits

adamspofford

77 commits

hansl

37 commits

roman-kashitsyn

27 commits

Languages

Rust

99.3%