Official build recipe templates for Internet Computer (ICP) canisters. Recipes provide standardized, reusable build configurations using Handlebars templates.
| Recipe | Description |
|---|---|
| Rust | Build Rust canisters using Cargo with WASM target |
| Motoko | Compile Motoko source code using the moc compiler |
| Pre-built | Use pre-compiled WASM files with metadata injection |
| Asset Canister | Deploy the official IC assets canister for frontend apps |
Reference a recipe in your icp.yaml file:
canisters: - name: backend recipe: type: "@dfinity/rust@v3.0.0" configuration: package: my-canister shrink: true
Recipes follow the @dfinity/<recipe-name>@<version> naming pattern:
@dfinity/rust@<version>- Rust canister recipe@dfinity/motoko@<version>- Motoko canister recipe@dfinity/pre-built@<version>- Pre-built WASM recipe@dfinity/asset-canister@<version>- Asset canister recipe
After release 0.1.1 of icp-cli you are required to append @<version> to the recipe type:
canisters: - name: backend recipe: type: "@dfinity/rust@v3.0.0" configuration: package: my-canister
For security reasons, you can also add a sha256 to verify the integrity of the template:
canisters: - name: backend recipe: type: "@dfinity/rust@v3.0.0" sha256: 620151f0c07efc1e8a986f73b85406b78bea09a92fc899f299a431431a6a6819 configuration: package: my-canister
Each recipe is versioned independently. View release history by recipe type:
Releases follow semantic versioning and include auto-generated changelogs.
- Recipe Authoring Guide - Create custom recipes
- Recipe README Template - Documentation template
Contributions are welcome! Please see the contribution guide for details.
- Report issues: GitHub Issues
- Questions & discussions: DFINITY Developer Forum
This project is licensed under the Apache-2.0 license.