Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Dynamic canister #24

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

WIP: Dynamic canister #24

wants to merge 9 commits into from

Conversation

qti3e
Copy link
Contributor

@qti3e qti3e commented Sep 3, 2022

This implements the management canister with a custom ic_kit_install method. The final result should be having the ability to dynamically install typed canisters both in the kit-runtime and to make it work in the IC env as well.

#[derive(KitCanister)]
#[candid_path("candid.did")]
#[wasm_path("canister.wasm")]
pub struct CounterCanister;

And a factory canister should now be able to deploy this canister on the fly by doing:

use counter_canister::CounterCanister;

#[update]
fn deploy_canister(canister_id: Principal) {
  CounterCanister::install_code(canister_id, InstallConfig {...}).await;
}

The install_code implementation should use different targets #[cfg(not(target_family = "wasm"))] and #[cfg(target_family = "wasm")] to perform platform specific calls to the management canister.

…WASM

this allows a canister to import another canister as crate without re-implementing that canister
…WASM

this allows a canister to import another canister as crate without re-implementing that canister
@saikatdas0790
Copy link
Contributor

Hi @qti3e,

Any movement on this? Eagerly awaiting this release ❤️

@qti3e
Copy link
Contributor Author

qti3e commented Sep 8, 2022

@saikatdas0790 been caught up with some higher priorities recently, will get back to this feature this weekend. xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants