|
1 | | -# ICP Recipes |
| 1 | +# ICP CLI Recipes |
2 | 2 |
|
3 | | -A comprehensive repository of Internet Computer (IC) canister build recipes using Handlebars templates. |
| 3 | +[](./LICENSE) |
4 | 4 |
|
5 | | -## Overview |
| 5 | +Official build recipe templates for Internet Computer (ICP) canisters. Recipes provide standardized, reusable build configurations using Handlebars templates. |
6 | 6 |
|
7 | | -This repository serves as the official Dfinity recipe repository for various ICP projects. Recipes are specified as Handlebars templates that generate build configurations for different types of IC canisters. |
| 7 | +## Available Recipes |
8 | 8 |
|
9 | | -## Using Recipes |
| 9 | +| Recipe | Description | |
| 10 | +|--------|-------------| |
| 11 | +| [**Rust**](recipes/rust/README.md) | Build Rust canisters using Cargo with WASM target | |
| 12 | +| [**Motoko**](recipes/motoko/README.md) | Compile Motoko source code using the moc compiler | |
| 13 | +| [**Pre-built**](recipes/prebuilt/README.md) | Use pre-compiled WASM files with metadata injection | |
| 14 | +| [**Asset Canister**](recipes/asset-canister/README.md) | Deploy the official IC assets canister for frontend apps | |
10 | 15 |
|
11 | | -Recipes are consumed by referencing them in your `icp.yaml` file: |
| 16 | +## Quick Start |
| 17 | + |
| 18 | +### Using a Recipe |
| 19 | + |
| 20 | +Reference a recipe in your `icp.yaml` file: |
12 | 21 |
|
13 | 22 | ```yaml |
14 | 23 | canister: |
15 | | - name: my-canister |
| 24 | + name: backend |
16 | 25 | recipe: |
17 | | - type: prebuilt |
18 | | - url: https://github.com/dfinity/icp-recipes/releases/download/v1.0.0/recipes/prebuilt/recipe.yml |
| 26 | + type: "@dfinity/rust" |
19 | 27 | configuration: |
20 | | - path: ../dist/my-canister.wasm |
21 | | - sha256: 17a05e36278cd04c7ae6d3d3226c136267b9df7525a0657521405e22ec96be7a |
| 28 | + package: my-canister |
| 29 | + shrink: true |
22 | 30 | ``` |
23 | 31 |
|
24 | | -## Recipe Types |
| 32 | +### Recipe Naming Convention |
| 33 | +
|
| 34 | +Recipes follow the `@dfinity/<recipe-name>` naming pattern: |
| 35 | +- `@dfinity/rust` - Rust canister recipe |
| 36 | +- `@dfinity/motoko` - Motoko canister recipe |
| 37 | +- `@dfinity/pre-built` - Pre-built WASM recipe |
| 38 | +- `@dfinity/asset-canister` - Asset canister recipe |
25 | 39 |
|
26 | | -- **prebuilt**: For using pre-compiled WASM files |
27 | | -- **assets**: For the official IC assets canister with asset synchronization |
28 | | -- **motoko**: For compiling Motoko source code |
29 | | -- **rust**: For building Rust canisters with Cargo |
| 40 | +### Using Specific Versions |
| 41 | + |
| 42 | +To pin to a specific recipe version, append `@<version>` to the recipe type: |
| 43 | + |
| 44 | +```yaml |
| 45 | +canister: |
| 46 | + name: backend |
| 47 | + recipe: |
| 48 | + type: "@dfinity/rust@v3.0.0" |
| 49 | + configuration: |
| 50 | + package: my-canister |
| 51 | +``` |
30 | 52 |
|
31 | | -## Authoring Recipes |
| 53 | +Without a version specified, the latest stable version is used. View available versions in the [releases page](https://github.com/dfinity/icp-cli-recipes/releases). |
32 | 54 |
|
33 | | -See [Recipe Authoring Guide](docs/recipe-authoring.md) for guidelines on creating new recipes. |
| 55 | +## Releases |
34 | 56 |
|
35 | | -## Versioning |
| 57 | +Each recipe is versioned independently. View release history by recipe type: |
| 58 | +- [Rust releases](https://github.com/dfinity/icp-cli-recipes/releases?q=rust&expanded=true) |
| 59 | +- [Motoko releases](https://github.com/dfinity/icp-cli-recipes/releases?q=motoko&expanded=true) |
| 60 | +- [Pre-built releases](https://github.com/dfinity/icp-cli-recipes/releases?q=prebuilt&expanded=true) |
| 61 | +- [Asset Canister releases](https://github.com/dfinity/icp-cli-recipes/releases?q=asset-canister&expanded=true) |
36 | 62 |
|
37 | | -This repository follows semantic versioning. Each release publishes recipe artifacts that can be referenced by URL. |
| 63 | +Releases follow semantic versioning and include auto-generated changelogs. |
38 | 64 |
|
39 | | -## Future Roadmap |
| 65 | +## Documentation |
40 | 66 |
|
41 | | -- [ ] Recipe validation framework |
42 | | -- [ ] Advanced testing infrastructure |
43 | | -- [ ] Template repository for creating custom recipe libraries |
44 | | -- [ ] Enhanced documentation with interactive examples |
45 | | -- [ ] Community recipe submission process |
| 67 | +- [Recipe Authoring Guide](docs/recipe-authoring.md) - Create custom recipes |
| 68 | +- [Recipe README Template](docs/recipe-readme-template.md) - Documentation template |
46 | 69 |
|
47 | 70 | ## Contributing |
48 | 71 |
|
49 | | -Contributions are welcome! Please see the [contribution guide](./.github/CONTRIBUTING.md) for more information. |
| 72 | +Contributions are welcome! Please see the [contribution guide](./.github/CONTRIBUTING.md) for details. |
| 73 | + |
| 74 | +## Support |
| 75 | + |
| 76 | +- Report issues: [GitHub Issues](https://github.com/dfinity/icp-cli-recipes/issues) |
| 77 | +- Questions & discussions: [DFINITY Developer Forum](https://forum.dfinity.org/) |
50 | 78 |
|
51 | 79 | ## License |
52 | 80 |
|
|
0 commit comments