Skip to content

feat!: use _.canister.name built-in instead of explicit package param (Rust recipe)#27

Draft
marc0olo wants to merge 1 commit into
mainfrom
feat/rust-canister-name-builtin
Draft

feat!: use _.canister.name built-in instead of explicit package param (Rust recipe)#27
marc0olo wants to merge 1 commit into
mainfrom
feat/rust-canister-name-builtin

Conversation

@marc0olo
Copy link
Copy Markdown
Member

@marc0olo marc0olo commented Jun 1, 2026

Summary

  • Drops the package configuration parameter from the Rust recipe — the canister name is now injected automatically via {{_.canister.name}}
  • The Cargo package name in Cargo.toml must match the canister name in icp.yaml — this was already the implicit convention, now it's the enforced one
  • Mirrors the same change made to the Motoko recipe in feat!: rewrite Motoko recipe to delegate compilation to mops build #26

Breaking change

Remove package: from recipe configuration and ensure the canister name in icp.yaml matches [package].name in Cargo.toml:

# before
canisters:
  - name: backend
    recipe:
      type: "@dfinity/rust@<version>"
      configuration:
        package: backend

# after
canisters:
  - name: backend
    recipe:
      type: "@dfinity/rust@<version>"

Blocked on

dfinity/icp-cli#567 — provides {{_.canister.name}} built-in variable

🤖 Generated with Claude Code

Drop the `package` configuration parameter — the canister name is now
injected automatically via {{_.canister.name}} (requires icp-cli#567).
The Cargo package name in Cargo.toml must match the canister name in
icp.yaml, which was already the implicit convention.

BREAKING CHANGE: `package` param removed. Ensure the canister name in
icp.yaml matches [package].name in Cargo.toml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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