docs: merge binding generation into Candid interface guide#17
Merged
Conversation
- Add "Binding generation" section to candid.md covering @icp-sdk/bindgen (JS/TS with Vite plugin and CLI) and ic-cdk-bindgen (Rust with build.rs) - Remove didc bind from Candid tools table — use dedicated bindgen tools - Document both auto-generated and hand-written .did paths for Motoko - Add Rust recipe auto-extraction note for candid field - Add cross-link from onchain-calls canister discovery to binding generation - Remove binding-generation.md stub (content absorbed into candid.md) - Update offchain-calls stub cross-link to point to candid.md - Update migration plan: mark task #47 as merged, fix dependency tree - Record decision in decisions.md
Bindings provide type-safe call stubs, not discovery. Reframe the tip to focus on the typed calling experience instead of implying bindings handle canister ID lookup.
- Replace ICP_CANISTER_ID:callee with PUBLIC_CANISTER_ID:callee to match what icp-cli actually injects via icp deploy - Add human verification comments for upstream bindgen README mismatch and @icp-sdk/bindgen Vite plugin import path - Fix fragile #rust-1 anchor to #binding-generation in onchain-calls tip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
binding-generation.mdpage into the existing Candid interface guide as a "Binding generation" section, eliminating overlap@icp-sdk/bindgenfor JS/TS (Vite plugin + CLI) andic-cdk-bindgenfor Rust (Cargo build script with dynamic/static callee modes)didc bindfrom the Candid tools table — binding generation should use the dedicated tools, not the low-level CLI.didfile paths for Motoko (per the pattern indfinity/examplescommitf8d6543)Sync recommendation
Informed by
ic-cdk-bindgenREADME (.sources/cdk-rs),@icp-sdk/bindgendocs, icp-cli-recipes Motoko/Rust READMEs, and icp-cliconcepts/binding-generation.md