# Rust CDK release v0.6.8

**URL:** <https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904>\
**Category:** Rust\
**Created:** [November 28, 2022, 5:25pm UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904 "2022-11-28T17:25:30Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![lwshang](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lwshang/32/3394_2.png) [@lwshang](https://forum.dfinity.org/u/lwshang)\
**Post date:** [November 28, 2022, 5:25pm UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/1 "2022-11-28T17:25:30Z")

</div>

I’m happy to announce that [Rust CDK 0.6.8](https://crates.io/crates/ic-cdk) is out.

This version includes [support for a couple of new IC features](https://github.com/dfinity/cdk-rs/blob/main/src/ic-cdk/CHANGELOG.md#068---2022-11-28):

## Canister Timers

Now, you can set timers for canisters. This feature allows a more flexible way to schedule later works. Compared with the existing `heartbeat` mechanism, Canister Timers allows:

- set both one-time and repeating jobs;
- set multiple jobs with different time intervals;
- cancel timers set before

Check the [example](https://github.com/dfinity/cdk-rs/blob/main/e2e-tests/canisters/timers.rs) for how to use it.

## Composite query

Tagging a function with `#[query(composite = true)]` will make it a composite query.

Composite queries can call other query functions (both queries and composite queries), but cannot be called in replicated mode.

For more details about composite queries, please check these forum threads:

- [https://forum.dfinity.org/t/proposal-composite-queries/15979](https://forum.dfinity.org/t/proposal-composite-queries/15979)
- [https://forum.dfinity.org/t/inter-canister-query-calls-community-consideration/6754](https://forum.dfinity.org/t/inter-canister-query-calls-community-consideration/6754)

* * *

Huge thanks to @AdamS who implemented both features!

Enjoy building canisters on IC with the improved Rust CDK!

---

<div class="post-metadata">

**Author:** ![ulan](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ulan/32/2705_2.png) [@ulan](https://forum.dfinity.org/u/ulan)\
**Post date:** [November 28, 2022, 6:13pm UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/2 "2022-11-28T18:13:56Z")

</div>

Please note that composite queries are available only for local development and testing. They are not released on the mainnet yet.

---

<div class="post-metadata">

**Author:** ![Gekctek](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gekctek/32/6863_2.png) [@Gekctek](https://forum.dfinity.org/u/Gekctek)\
**Post date:** [November 28, 2022, 8:37pm UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/3 "2022-11-28T20:37:05Z")

</div>

Great work!  
In general what is Dfinity’s plan for Motoko/Rust features. Do you guys try to do them at the same time?

---

<div class="post-metadata">

**Author:** ![lwshang](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lwshang/32/3394_2.png) [@lwshang](https://forum.dfinity.org/u/lwshang)\
**Post date:** [November 28, 2022, 9:11pm UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/4 "2022-11-28T21:11:03Z")

</div>

We attempt to support a new feature in Rust/Motoko before the feature is enabled on the IC mainnet. So that canister developers can develop/test with new functionalities early and deploy as soon as they are available on the mainnet.

Rust/Motoko CDK are developed separately. When a CDK implements support for a new feature, it will be released right away. There is no release syncing between these two CDK.

---

<div class="post-metadata">

**Author:** ![saikatdas0790](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/saikatdas0790/32/17147_2.png) [@saikatdas0790](https://forum.dfinity.org/u/saikatdas0790)\
**Post date:** [November 29, 2022, 5:23am UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/5 "2022-11-29T05:23:16Z")

</div>

Any thoughts on which ic-state-machine-tests commit we should be referencing to be able to test these features in our integration tests?

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [November 29, 2022, 7:56am UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/6 "2022-11-29T07:56:17Z")

</div>

Intuitively I would go for the commit that is either deployed on your subnet or in your current dfx version

---

<div class="post-metadata">

**Author:** ![saikatdas0790](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/saikatdas0790/32/17147_2.png) [@saikatdas0790](https://forum.dfinity.org/u/saikatdas0790)\
**Post date:** [November 30, 2022, 7:05am UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/7 "2022-11-30T07:05:47Z")

</div>

@Vivienne  
So, I’m trying to figure out how to make this work.

If this is my subnet, how would I figure out the release commit hash?

> **[Subnet: o3ow2-2ipam-6fcjo-3j5vt-fzbge-2g7my-5fz2m-p4o2t-dwlc4-gt2q7-5ae](https://dashboard.internetcomputer.org/subnet/o3ow2-2ipam-6fcjo-3j5vt-fzbge-2g7my-5fz2m-p4o2t-dwlc4-gt2q7-5ae)**
>
> Application subnet blockchain which hosts canister smart contracts and adds capacity to the Internet Computer.

I wasn’t quite sure how to figure the commit for the dfx version as well. I’m on DFX 0.12.1, btw

I also tried to make it with the latest blessed replica release which is this:

> **[Release: 997ab2e9cc49189302fe54c1e60709abfbeb1d42](https://dashboard.internetcomputer.org/release/997ab2e9cc49189302fe54c1e60709abfbeb1d42)**
>
> Internet Computer replica version release and associated subnet replica version updates.

But I’m getting the following errors when building my Cargo project

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/4/45b61ab7ec524ebdb9de2e88eb889ea4d5287f37.png)

Any thoughts?

P.S. This is the commit that builds without breaking for me right now

> <https://github.com/dfinity/ic/commit/f7e3c96a2be92186718f6a1e67eea37bf3252c00>
>
> \[hotfix\] Revert "\[MR-300\] Reimplement tip\_to\_checkpoint as rename & mark\_readonl…y"
> 
> This reverts commit 63aa689efd2bd06a84762fd1e493c119feaf6d55. 
> 
> See merge request dfinity-lab/public/ic!8255

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [November 30, 2022, 7:15am UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/8 "2022-11-30T07:15:08Z")

</div>

> [@saikatdas0790](#):
>
> If this is my subnet, how would I figure out the release commit hash?

You go to [this page](https://dashboard.internetcomputer.org/governance?s=100&topic=TOPIC_SUBNET_REPLICA_VERSION_MANAGEMENT) on the dashboard and Ctrl+F for your subnet’s ID. Using that, I see that the latest version update proposal for your subnet is [this one](https://dashboard.internetcomputer.org/proposal/93423). From there you can see that it’s running replica version 0cbb2e9c7683f4cd91f77e8ab0d65f6cb90c0387 right now.

> [@saikatdas0790](#):
>
> I wasn’t quite sure how to figure the commit for the dfx version as well.

Go to the [dfx release notes](https://internetcomputer.org/docs/current/developer-docs/updates/release-notes/) and scroll down to the section ‘Dependencies’ for your current release. For 0.12.1 it shows a replica commit of dcbf401f27d9b48354e68389c6d8293c4233b055.

As for the Cargo error: I haven’t tried to work with state machine tests ever, so I don’t think I can help with that. @roman-kashitsyn would be the right person to ask

---

<div class="post-metadata">

**Author:** ![saikatdas0790](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/saikatdas0790/32/17147_2.png) [@saikatdas0790](https://forum.dfinity.org/u/saikatdas0790)\
**Post date:** [November 30, 2022, 8:26am UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/9 "2022-11-30T08:26:01Z")

</div>

I managed to make it work.

For future readers, the trick is to ensure the protocol buffers compiler `protoc` and additional include files are installed.

I installed it from [here](https://grpc.io/docs/protoc-installation/#install-pre-compiled-binaries-any-os)

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [November 30, 2022, 4:27pm UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/10 "2022-11-30T16:27:52Z")

</div>

It would be nice to somehow indicate to developers when a feature is truly live. I usually have to understand a combination of cdk-rs version, dfx version, and IC replica version deployed to subnets before understanding when a feature is truly live.

For example, cdk-rs now has timers, but which dfx version has it (hypothetical question, I’ve been told dfx 0.12.1), and does that mean it’s live on the IC?

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [November 30, 2022, 4:57pm UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/11 "2022-11-30T16:57:15Z")

</div>

Good idea. We should add version requirements to these release notes for such features. I’ll let the team know

---

<div class="post-metadata">

**Author:** ![diegop](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/diegop/32/569_2.png) [@diegop](https://forum.dfinity.org/u/diegop)\
**Post date:** [November 30, 2022, 7:43pm UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/12 "2022-11-30T19:43:30Z")

</div>

> [@lastmjs](#):
>
> For example, cdk-rs now has timers, but which dfx version has it (hypothetical question, I’ve been told dfx 0.12.1), and does that mean it’s live on the IC?

Good point, @lastmjs

---

<div class="post-metadata">

**Author:** ![josephgranata](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/josephgranata/32/21930_2.png) [@josephgranata](https://forum.dfinity.org/u/josephgranata)\
**Post date:** [April 5, 2023, 8:52pm UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/14 "2023-04-05T20:52:48Z")

</div>

Just a quick question to confirm this is now live on the IC correct?

Thanks.

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [April 6, 2023, 7:05am UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/15 "2023-04-06T07:05:03Z")

</div>

Yes, that’s correct.

---

<div class="post-metadata">

**Author:** ![josephgranata](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/josephgranata/32/21930_2.png) [@josephgranata](https://forum.dfinity.org/u/josephgranata)\
**Post date:** [April 6, 2023, 6:17pm UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/16 "2023-04-06T18:17:19Z")

</div>

Thanks for that quick reply, good news @Vivienne!

---

<div class="post-metadata">

**Author:** ![NS01](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ns01/32/9816_2.png) [@NS01](https://forum.dfinity.org/u/NS01)\
**Post date:** [July 15, 2023, 8:11pm UTC](https://forum.dfinity.org/t/rust-cdk-release-v0-6-8/16904/17 "2023-07-15T20:11:14Z")

</div>

I’ve been hitting a brick wall for the last few days with some Rust code which seemed to stop, discard data and then re-run… all without throwing an error! Turns out a function which was being called by a timer was hitting the computation/ instruction limit.

This was apparent when calling the function via a manual update method (which would trap and return the error). I’m interested if it’s possible to handle/ log such situations with a timer function?
