Skip to content

dfinity/icp-cli-recipes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ICP CLI Recipes

License

Official build recipe templates for Internet Computer (ICP) canisters. Recipes provide standardized, reusable build configurations using Handlebars templates.

Available Recipes

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

Quick Start

Using a Recipe

Reference a recipe in your icp.yaml file:

canisters:
  - name: backend
    recipe:
      type: "@dfinity/rust@v3.0.0"
      configuration:
        package: my-canister
        shrink: true

Recipe Naming Convention

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

Using Specific Versions

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

Releases

Each recipe is versioned independently. View release history by recipe type:

Releases follow semantic versioning and include auto-generated changelogs.

Documentation

Contributing

Contributions are welcome! Please see the contribution guide for details.

Support

License

This project is licensed under the Apache-2.0 license.