"Best Practices for Canisters in Rust" now available as text

Hi!

I wrote a blog post that presents all the topics I raised in Best Practices for Canisters in Rust community talk (Community Conversations | Best Practices for Canisters in Rust - YouTube) in a linkable and sharable form (all the headers and the little hands to the left of each piece of advice are links).

I think blog post format is appropriate in this case because:

  1. All the recommendations reflect my personal opinion, hopefully with enough argumentation to persuade the reader.
  2. I want to be able to easily update and extend the contents from time to time.

If you have constructive feedback or want to see some topic explained more deeply, feel free to comment here or open an issue on GitHub.

10 Likes

Hi Roman,

Thanks a lot for the blog post! It answered a lot of questions I had about best practices, and highlighted some problems with the way I had coded canisters so far.

I was wondering if you could briefly expand on the async usage do’s and don’ts … Are there any obvious pitfalls? Should we code everything synchronously? Tradeoffs? In your blog post, you link to two heavily used canisters, and one uses async, the other (asset canister) doesn’t. Can you speak to what led to each choice?

edit: most of my questions were answered in the youtube talk! It’s much more clear after watching the part where you describe the flow of an async call to another canister, and how (not) to deal with data while waiting for the response.

Thanks a lot, again! This blog post has been a godsend!

2 Likes