ic-cdk
Canister Developer Kit for the Internet Computer.
0.20.2
4.9M downloads/mo
#4545 most downloaded on crates.io
dfinity/cdk-rs
What this package is like to depend on
Last release 2 months ago
08 Jun 2026
Release timing varies
gaps range from 8 days to 4 months
Most releases are documented
notes for 30 of 41 stable releases
49 versions withdrawn
withdrawn after publishing
6 years old
97 releases · first in 2020
6 releases in the last 12 months
see the full history below
Release timeline
97 releases · Oct 2020 to Jun 2026Releases
latest 60 of 97-
0.20.208 Jun 2026Release notes
Open source →Changed
- Update, query,
init, andpost_upgradecanister entry points now interpret an empty input vector as the Candid encoding of(), making them more lenient when no arguments are provided. This does not apply to methods usingdecode_with, which still receive the raw (empty) bytes.
- Update, query,
-
0.20.120 Apr 2026Release notes
Open source →Added
- Added
msg_caller_info_dataandmsg_caller_info_signertoic_cdk::api, exposing the caller's identity attribute data and the signing canister ID respectively.
- Added
-
0.20.005 Mar 2026Release notes
Open source →Changed
- [BREAKING] Remove all items deprecated in v0.18.0:
api::call,api::stable,api::management_canistermodules and legacy functions (spawn,print,caller,id,canister_balance,set_certified_data,set_global_timer). - [BREAKING] Move the
bitcoin_canistermodule to a separate crateic-cdk-bitcoin-canister. Users should depend onic-cdk-bitcoin-canisterdirectly. - [BREAKING] Move the
management_canistermodule to a separate crateic-cdk-management-canister. Users should depend onic-cdk-management-canisterdirectly. Thetransform-closurefeature is also moved to the new crate.
- [BREAKING] Remove all items deprecated in v0.18.0:
-
0.19.013 Nov 2025Release notes
Open source →Added
- Support Canister Environment Variable. (#636)
- Add binding for
env_var_*API.
- Add binding for
- New Management Canister methods:
canister_metadataread_canister_snapshot_metadataread_canister_snapshot_dataupload_canister_snapshot_metadataupload_canister_snapshot_data
Changed
-
[BREAKING] Updated to version 2.0 of the async executor. The
spawnfunction now creates protected tasks that panic (or are canceled, withspawn_weak) if they outlive the canister method (with a newspawn_migratoryfunction for tasks that are supposed to outlive the method). A trap will now cancel all protected tasks in the method it is part of. See the module docs for more information.- The async machinery that is primarily used from macros (i.e.
in_*_context) has been moved toic_cdk::futures::internals.
- The async machinery that is primarily used from macros (i.e.
-
[BREAKING] Upgrade
ic-management-canister-typeswhich contains the changes for:- Canister Environment Variable.
- Non-replicated HTTP outcalls.
- Support Canister Environment Variable. (#636)
-
0.19.0-beta.309 Oct 2025 pre-releaseNothing published for this version
-
0.19.0-beta.211 Sep 2025 pre-releaseNothing published for this version
-
0.19.0-beta.125 Jun 2025 pre-releaseNothing published for this version
-
0.18.720 Aug 2025Release notes
Open source →Added
- The macros annotate
#[allow(clippy::disallowed_methods)]above the invocation ofic_cdk::futures::spawn.
The
ic_cdk::futures::spawnmethod has a different poll order that can affect canister behavior. While some projects may wish to enforce adisallowed-methodslint rule to prevent its use, the invocations generated by our macros are a false positive. This annotation prevents the warning from being triggered for the macro-generated code, ensuring a clean linting experience for developers who adopt the new rule. - The macros annotate
-
0.18.619 Aug 2025Release notes
Open source →Added
- Restored the default
skipping_quotato match the behavior of previous versions of the macros.
Fixed
- The macros now support 2024 edition.
Changed
- MSRV raised to 1.85.0.
- Restored the default
-
0.18.525 Jun 2025Release notes
Open source →Fixed
- Tasks which return after canceling futures are no longer marked as trapped
Changed
- Updated to
ic0v1.0.0
-
0.18.417 Jun 2025Release notes
Open source →Added
- New
ic_cdk::futuresfunctionspawn_017_compat. This has the code ordering behavior of 0.17, with spawned futures run immediately instead of waiting for the current code to suspend.
- New
-
0.18.304 Jun 2025 withdrawnRelease notes
Open source →Added
- Support
root_keyAPI. (#619)
Changed
-
Update bitcoin
regtestcycles cost to be same as the bitcoinmainnet.fees = record { get_current_fee_percentiles = 10_000_000 : nat; get_utxos_maximum = 10_000_000_000 : nat; get_block_headers_cycles_per_ten_instructions = 10 : nat; get_current_fee_percentiles_maximum = 100_000_000 : nat; send_transaction_per_byte = 20_000_000 : nat; get_balance = 10_000_000 : nat; get_utxos_cycles_per_ten_instructions = 10 : nat; get_block_headers_base = 50_000_000 : nat; get_utxos_base = 50_000_000 : nat; get_balance_maximum = 100_000_000 : nat; send_transaction_base = 5_000_000_000 : nat; get_block_headers_maximum = 10_000_000_000 : nat; };You can get the fees by
get_configAPI on the BTC Mainnet Canister.
- Support
-
0.18.214 May 2025 withdrawnRelease notes
Open source →Added
- New CDK library
ic-cdk-executorcontaining the low-level async executor primitives previously inic-cdk. Most users will never need to use this library and should continue using the interface fromic-cdk.
Changed
- Bump
ic-error-typesto v0.2.0 from which we re-export theRejectCodetype.
- New CDK library
-
0.18.2-alpha.114 May 2025 pre-releaseRelease notes
Open source →chore: Release alpha versions of other crates matching [email protected]…
-
0.18.109 May 2025 withdrawnRelease notes
Open source →Added
- Support VetKD management canister API. (#597)
- Add
Call::take_raw_argswhich owns the bytes. (#601)
-
0.18.022 Apr 2025 withdrawnRelease notes
Open source →Please check Version 0.18 Guide for more details.
Added
- New
CallAPI.- Supports bounded-wait inter-canister calls.
- Uses a builder pattern for optional call configuration.
- Allows chaining
.candid()decoding only when needed. - Provides ergonomic Rust error handling to encourage best practices.
- Support for Wasm64 module compilation.
- Seamlessly handles 32-bit and 64-bit System APIs.
- Enhanced macros for flexible argument decoding and result encoding.
update/query/initmacros now support custom argument decoders viadecode_with.update/querymacros now support custom result encoders viaencode_with.
- Simplified module hierarchy with one level under the crate root.
apimodule offers consistent System API bindings.management_canistermodule for convenient Management Canister calls.bitcoin_canistermodule for direct Bitcoin Canisters calls.
- Enhanced cycles cost calculation for Management Canister API calls:
- New system APIs exposed through the
apimodule:cost_http_request,cost_sign_with_ecdsa,cost_sign_with_schnorr,cost_vetkd_derive_key.
- High-level bindings in the
management_canistermodule accept call arguments by reference. - All relevant Management Canister methods now automatically attach the required cycles to calls.
- New system APIs exposed through the
Changed
- Introduces a new task scheduler-based executor.
- Capable of scheduling any async task, not limited to inter-canister calls.
- The
futuresmodule is now public to expose functionalities related to the async executor. - The new implementation enables code to have (intended) surprising behavior - it is recommended to read the module docs
Deprecated
- Submodules in
apiare now deprecated in favor of root-level modules.api/call->callapi/management_canister->management_canister&bitcoin_canisterapi/stable->stable
- New
-
0.18.0-alpha.219 Mar 2025 pre-releaseNothing published for this version
-
0.18.0-alpha.126 Feb 2025 pre-releaseNothing published for this version
-
0.17.213 May 2025Nothing published for this version
-
0.17.119 Dec 2024 withdrawnRelease notes
Open source →Added
- Add method
bitcoin_get_block_headers. - Support management canister method:
subnet_info. (#532)- Add types:
SubnetInfoArgsandSubnetInfoResult.
- Add types:
Fixed
- Fix update/query macro could not handle function arguments with the same name as the function itself. (#525)
- Add method
-
0.17.005 Nov 2024 withdrawnRelease notes
Open source →Changed
- Add
AllowedViewersvariant toLogVisibilityenum. (#512)
Added
- Attribute
#[on_low_wasm_memory]for low-memory hook. (#528) - Support Threshold Schnorr signing management canister API. (#518)
- Add
-
0.16.114 May 2025Nothing published for this version
-
0.16.027 Aug 2024 withdrawnRelease notes
Open source →Changed
- BREAKING: Add the
LoadSnapshotvariant toCanisterChangeDetails. (#504)
Added
- Support Canister State Snapshots. (#504)
- Add methods:
take_canister_snapshot,load_canister_snapshot,list_canister_snapshots,delete_canister_snapshot - Add types:
LoadSnapshotRecord,SnapshotId,Snapshot,TakeCanisterSnapshotArgs,LoadCanisterSnapshotArgs,DeleteCanisterSnapshotArgs
- Add methods:
- BREAKING: Add the
-
0.15.214 May 2025Nothing published for this version
-
0.15.116 Aug 2024 withdrawnNothing published for this version
-
0.15.001 Jul 2024 withdrawnRelease notes
Open source →Changed
- BREAKING: Stable Memory always use 64-bit addresses and
stable64_*system API. (#498) - BREAKING: Add
log_visibilityto the management canister API types: (#497)CanisterSettingsDefiniteCanisterSettings.
- BREAKING: Stable Memory always use 64-bit addresses and
-
0.14.214 May 2025Nothing published for this version
-
0.14.116 Aug 2024 withdrawnNothing published for this version
-
0.14.017 May 2024 withdrawnNothing published for this version
-
0.13.614 May 2025Nothing published for this version
-
0.13.519 Aug 2024 withdrawnNothing published for this version
-
0.13.416 Aug 2024 withdrawnNothing published for this version
-
0.13.310 May 2024 withdrawnRelease notes
Open source →Added
- Provide safe wrapper of
in_replicated_executionin ic-cdk. (#489)
Changed
- Upgrade
ic0to v0.23.0. (#489) - BREAKING: Add
wasm_memory_limitto the management canister API types: (#483)CanisterSettingsDefiniteCanisterSettings.
- Provide safe wrapper of
-
0.13.208 Apr 2024 withdrawnRelease notes
Open source →Added
- Management canister methods for interacting with the chunk store. (#461)
- Provide safe wrapper of
global_timer_setin ic-cdk. (#475)
-
0.13.101 Mar 2024 withdrawn -
0.13.001 Mar 2024 withdrawnRelease notes
Open source →Added
- Add
is_recovering_from_trapfunction for implementing trap cleanup logic. (#456) - Allow setting decoding quota for canister entry points and inter-canister calls. (#465)
- When defining canister entry points, we add the following attributes:
#[update(decoding_quota = 10000, skipping_quota = 100, debug = true)]skipping_quotalimits the amount of work allowed for skipping unneeded data on the wire. If this attributes is not present, we set a default quota of10_000. This affects ALL existing canisters, and is mainly used to improve canister throughput. See docs on the Candid library to understand the skipping cost.decoding_quotalimits the total amount of work the deserializer can perform. See docs on the Candid library to understand the cost model.debug = trueprints the instruction count and the decoding/skipping cost to the replica log, after a successful deserialization. The decoding/skipping cost is logged only when you have already set a quota in the attributes. The debug mode is useful to determine the right quotas above. Developers can send a few large payloads to the debugging entry point and know the actual decoding cost.
- When making inter-canister calls, we have a new function
call_with_configto config the same decoding quotas described above. It's strongly recommended to usecall_with_configwhen calling third-party untrusted canisters.
- When defining canister entry points, we add the following attributes:
Changed
ic_cdk::api::call::arg_datatakesArgDecoderConfigas argument. (#465)
- Add
-
0.12.314 May 2025Nothing published for this version
-
0.12.216 Aug 2024 withdrawnNothing published for this version
-
0.12.112 Jan 2024 withdrawnRelease notes
Open source →Changed
- Add "reserved cycles" fields to the management canister API: (#449)
reserved_cyclestoCanisterStatusResponsereserved_cycles_limittoCanisterSettingsandDefiniteCanisterSettings
Fixed
- The README file is now more informative and used as the front page of the doc site.
- The
call*methods are documented with examples and notes.
- Add "reserved cycles" fields to the management canister API: (#449)
-
0.12.023 Nov 2023 withdrawn -
0.11.714 May 2025Nothing published for this version
-
0.11.619 Aug 2024 withdrawnNothing published for this version
-
0.11.516 Aug 2024 withdrawnNothing published for this version
-
0.11.420 Nov 2023 withdrawn -
0.11.312 Oct 2023 withdrawnRelease notes
Open source →Added
- Another type of performance counter: "call context instruction counter".
Can be fetched using either method below: (#435)
ic_cdk::api::performance_counter(1);ic_cdk::api::call_context_instruction_counter()as a shorthand;
Changed
- Deprecate
ic_cdk::api::call::performance_counter()in favor ofic_cdk::api::performance_counter(). (#435)
- Another type of performance counter: "call context instruction counter".
Can be fetched using either method below: (#435)
-
0.11.211 Oct 2023 withdrawnRelease notes
Open source →Added
cycles_burncorresponding to system APIic0.cycles_burn128. (#434)
Changed
- Upgrade
ic0to0.21.1. (#434)
-
0.11.111 Oct 2023 withdrawn -
0.11.018 Sep 2023 withdrawnRelease notes
Open source →Changed
- Candid Export workflow is changed. (#424)
- No need to compile for WASI separately.
- Canisters should still invoke
ic_cdk::export_candid!()to export candid. - Then use
candid-extractorto extract candid from the canister WASM.
- Candid Export workflow is changed. (#424)
-
0.10.214 May 2025Nothing published for this version
-
0.10.116 Aug 2024 withdrawnNothing published for this version
-
0.10.013 Jul 2023 withdrawnRelease notes
Open source →Changed
- Upgrade
candidto0.9. (#411) - Remove
exportmodule. Please use candid directly in your project instead of usingic_cdk::export::candid. - Remove
ic_cdk_macro::importmodule. See below for a new way to import canisters.
Added
-
Export Candid: (#386)
- A wasi feature that builds the canister as a standalone WASI binary. Running the binary in wasmtime outputs the canister interface
- Build step:
cargo build --target wasm32-unknown-unknown \ --release \ --package "$package" --features "ic-cdk/wasi" wasmtime "target/wasm32-unknown-unknown/release/$package.wasm" > $did_file cargo build --target wasm32-unknown-unknown \ --release \ --package "$package" ic-wasm "target/wasm32-unknown-unknown/release/$package.wasm" \ -o "target/wasm32-unknown-unknown/release/$package.wasm" \ metadata candid:service -v public -f $did_file- In the canister code, users have to add
ic_cdk::export_candid!()at the end oflib.rs. In the future we may lift this requirement to provide a better DX.
-
Import Candid: (#390)
- Canister project adds
ic_cdk_bindgenas a build dependency to generate canister bindings - build.rs
use ic_cdk_bindgen::{Builder, Config}; fn main() { let counter = Config::new("counter"); let mut builder = Builder::new(); builder.add(counter); builder.build(None); // default write to src/declarations }- In the canister code,
mod declarations; use declarations::counter::counter; counter.inc().await? - Canister project adds
- Upgrade
-
0.9.414 May 2025Nothing published for this version
-
0.9.316 Aug 2024 withdrawnNothing published for this version
-
0.9.222 Jun 2023 withdrawn -
0.9.121 Jun 2023 withdrawn -
0.9.020 Jun 2023 withdrawnRelease notes
Open source →Added
- Set caller's canister version in the field
sender_canister_versionof management canister call payloads. (#401) - Add management canister types for
canister_infomanagement canister call (CanisterInfoRequestandCanisterInfoResponse). (#401)
Changed
- No hard-coded fees for management canister calls. (#404)
- Set caller's canister version in the field
-
0.8.314 May 2025Nothing published for this version
-
0.8.216 Aug 2024 withdrawnNothing published for this version
-
0.8.130 May 2023 withdrawnNothing published for this version
-
0.8.026 May 2023 withdrawnRelease notes
Open source →Added
ic0.is_controlleras a public function. (#383)
Changed
TransformContext::newhas been replaced with dedicated functions that accept closures. (#385)CallFutureonly makes an inter-canister call if it is awaited. (#391)