Skip to content
forked from dfinity/cdk-rs

Rust canister development kit for the Internet Computer.

License

Notifications You must be signed in to change notification settings

mikeyhodl/cdk-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Canister Development Kit

Documentation Crates.io License Downloads Test Status

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.

  • ic-cdk: Bindings of the System API.
  • ic-cdk-macros: Annotate functions with attribute macros to make them exposed public interfaces.
  • ic-cdk-optimizer: A binary tool to reduing size of the compiled wasm module.
  • ic-certified-map: An implementation of map which support certified queries.

Rust CDK in Action

In Cargo.toml:

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

[dependencies]
ic-cdk = "0.3"
ic-cdk-macros = "0.3"

Then in your rust source code:

#[ic_cdk_macros::query]
fn print() {
    ic_cdk::print("Hello World from DFINITY!");
}

Check tutorial for a detailed guidance.

About

Rust canister development kit for the Internet Computer.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%