Practical overview
When it fits
Use it when implementing an Internet Computer canister in Rust and you need the CDK or one of its listed supporting libraries. The repository’s minimal example shows adding the CDK crate, setting a `cdylib` crate type and defining a query function.
Who it is for
- Rust developers implementing Internet Computer canisters.
- Canister developers who need Candid-based inter-canister bindings, timers, certified queries or ICP ledger communication.
Documented uses
- Create Rust canister code that communicates with the Internet Computer execution environment through System API bindings.
- Expose Rust functions as canister interfaces using attribute macros.
- Generate Rust bindings for Candid-based calls between canisters.
- Add periodic or multiple timers to canister applications.
- Use a map implementation supporting certified queries.
Requirements & limits
The repository is public, identifies Apache-2.0 as its license, and links to the crate on crates.io and documentation on docs.rs.
- It targets Rust canister development on the Internet Computer, with WebAssembly canisters communicating through the Canister System API.
- The repository provides libraries for distinct tasks rather than replacing all project tooling; it identifies
dfxas the tool for managing IC projects. - The README’s starter example documents dependency and source configuration, while directing readers to the Rust quickstart for detailed guidance.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up a minimal Rust canister entry point
Add the CDK dependency and prepare a Rust library with a query function.
Before you start
- Rust project using Cargo.
- Internet Computer canister development context.
Steps
Add the dependency with the command below.
cargo add ic-cdkSet the library crate type to
cdylibin Cargo.toml.Create a Rust function and annotate it with
#[ic_cdk::query].
Expected outcome
A Rust library configured as a `cdylib` with a query function returning a string, following the repository’s example.
Guide limitations
- The example covers dependency and source configuration only; it does not document building, deploying, or invoking the canister.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 10 October 2026
- Original website title
- dfinity/cdk-rs · Official homepage title · retained in its source language

