Skip to content

docs: merge binding generation into Candid interface guide#17

Merged
marc0olo merged 3 commits into
mainfrom
docs/merge-binding-generation
Mar 17, 2026
Merged

docs: merge binding generation into Candid interface guide#17
marc0olo merged 3 commits into
mainfrom
docs/merge-binding-generation

Conversation

@marc0olo
Copy link
Copy Markdown
Member

Summary

  • Merges the planned binding-generation.md page into the existing Candid interface guide as a "Binding generation" section, eliminating overlap
  • Covers @icp-sdk/bindgen for JS/TS (Vite plugin + CLI) and ic-cdk-bindgen for Rust (Cargo build script with dynamic/static callee modes)
  • Removes didc bind from the Candid tools table — binding generation should use the dedicated tools, not the low-level CLI
  • Documents both auto-generated and hand-written .did file paths for Motoko (per the pattern in dfinity/examples commit f8d6543)
  • Adds cross-link from onchain-calls canister discovery section to binding generation
  • Updates migration plan dependencies and records the decision

Sync recommendation

Informed by ic-cdk-bindgen README (.sources/cdk-rs), @icp-sdk/bindgen docs, icp-cli-recipes Motoko/Rust READMEs, and icp-cli concepts/binding-generation.md

- 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
@marc0olo marc0olo merged commit cb684a5 into main Mar 17, 2026
1 check passed
@marc0olo marc0olo deleted the docs/merge-binding-generation branch March 17, 2026 13:32
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.

1 participant