Please consider turning these stable structures into importable packages

To the Dfinity team members maintaining this code, please consider turning the Rust stable structures that you’re using internally for the IC into modular packages that can be imported by other projects. It will provide further battle testing and also bring in varied use cases that will make the code more robust and contribute to the stability of the larger IC codebase that it’s used in. The community also benefits from the code stewardship of Dfinity

Thank you :slight_smile:

1 Like

Can’t speak for the cdk maintainers, but ic-kit and the new ic-kit-macros will be expanded with stable structures very soon, along with providing a compatible stable store/restore for existing pre/post upgrade

2 Likes

I really like ic-kit since I discovered and started using it since last week. All it needs is more documentation.

Detailed explanations and examples on all of these would be nice.

image

2 Likes

100% agree! We’re actually writing a detailed course/book all about the kit, safe canister code, best practices and things to avoid on the ic, as well as providing examples for everything :slight_smile: We’ll also release several boilerplate projects

4 Likes

This is such an AWESOME endeavour on your part

There’s very limited documentation on canister development using Rust. And most of it contains outdated advice.

Any chance I could obtain early access? I could help provide feedback or open issues if I find any

Hey! The developer preview of the IC-Kit 0.5 is out now you can check it out, we’re also planning to have a draft of the book out soon xD

1 Like

You should be able to use the crate in ic repo via:

[dependencies]
stable-structures = { git = "https://github.com/dfinity/ic", rev = "02a4a828f2f4d3b1dcb93a84e60672a3f3fdb400" }
3 Likes

Thank you. Some guidance/documentation around this would be phenomenal.

Nothing too elaborate. Just a simple readme in the stable-structures directory would be enough to start with

You might also find this example repo useful: GitHub - ielashi/stable-btreemap-example: Examples of using `StableBTreeMap` in Canisters

1 Like

Looks like there was a crate release: https://crates.io/crates/ic-stable-structures

4 Likes