Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SDK-1622
Description
The current API of
ic-cdk-bindgen
crate exposes many types from the dependencycandid_parser
.This rewrite is necessary for the upcoming "Trait-Bound Canister Development" feature. which will need Candid to Rust bindgen for various targets.
The targets will be supported:
Consumer
Provider
Type
Now, the main entry point to the
ic-cdk-bindgen
library isic_cdk_bindgen::Builder
.This PR focuses on changing the existing bindgen for inter-canister calls. In the context of Rust CDK, such usage is named
consumer
.Then in
lib.rs
of the consumer canister:Note
This PR is just a intermediate state of the "Trait-Bound Canister Development" feature. The base branch of this PR is not
main
but a dedicatedbindgen_next
branch.Support for provider and type will be implemented in the following PRs.
Docs and Changelog will be added when this overall feature is completed and before merge into the
main
branch.How Has This Been Tested?
examples: counter, profile
Checklist:
I have edited the CHANGELOG accordingly.I have made corresponding changes to the documentation.