Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ICP Examples (Motoko + Rust)",
"image": "ghcr.io/dfinity/icp-dev-env-all:0.1.0",
"image": "ghcr.io/dfinity/icp-dev-env-all:0.3.1",
"forwardPorts": [8000, 5173],
"portsAttributes": {
"8000": {
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hello_world.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
jobs:
motoko-hello_world:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-motoko:0.1.0
container: ghcr.io/dfinity/icp-dev-env-motoko:0.3.1
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Deploy and test
Expand All @@ -29,7 +29,7 @@ jobs:

rust-hello_world:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-rust:0.1.0
container: ghcr.io/dfinity/icp-dev-env-rust:0.3.1
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Deploy and test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vetkeys-basic-bls-signing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
jobs:
rust:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-rust:0.1.0
container: ghcr.io/dfinity/icp-dev-env-rust:0.3.1
env:
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand All @@ -26,7 +26,7 @@ jobs:
run: icp network start -d && icp deploy
motoko:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-motoko:0.1.0
container: ghcr.io/dfinity/icp-dev-env-motoko:0.3.1
env:
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vetkeys-basic-ibe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
jobs:
rust:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-rust:0.1.0
container: ghcr.io/dfinity/icp-dev-env-rust:0.3.1
env:
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand All @@ -26,7 +26,7 @@ jobs:
run: icp network start -d && icp deploy
motoko:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-motoko:0.1.0
container: ghcr.io/dfinity/icp-dev-env-motoko:0.3.1
env:
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vetkeys-basic-timelock-ibe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
jobs:
rust:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-rust:0.1.0
container: ghcr.io/dfinity/icp-dev-env-rust:0.3.1
env:
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vetkeys-encrypted-notes-app-vetkd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
jobs:
rust:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-rust:0.1.0
container: ghcr.io/dfinity/icp-dev-env-rust:0.3.1
env:
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand All @@ -26,7 +26,7 @@ jobs:
run: icp network start -d && icp deploy
motoko:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-motoko:0.1.0
container: ghcr.io/dfinity/icp-dev-env-motoko:0.3.1
env:
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
jobs:
rust:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-rust:0.1.0
container: ghcr.io/dfinity/icp-dev-env-rust:0.3.1
env:
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand All @@ -26,7 +26,7 @@ jobs:
run: icp network start -d && icp deploy
motoko:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-motoko:0.1.0
container: ghcr.io/dfinity/icp-dev-env-motoko:0.3.1
env:
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/vetkeys-password-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
jobs:
rust:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-rust:0.1.0
container: ghcr.io/dfinity/icp-dev-env-rust:0.3.1
env:
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand All @@ -26,7 +26,7 @@ jobs:
run: icp network start -d && icp deploy
motoko:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-motoko:0.1.0
container: ghcr.io/dfinity/icp-dev-env-motoko:0.3.1
env:
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/who_am_i.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
jobs:
motoko-who_am_i:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-motoko:0.1.0
container: ghcr.io/dfinity/icp-dev-env-motoko:0.3.1
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Deploy and test
Expand All @@ -29,7 +29,7 @@ jobs:

rust-who_am_i:
runs-on: ubuntu-24.04
container: ghcr.io/dfinity/icp-dev-env-rust:0.1.0
container: ghcr.io/dfinity/icp-dev-env-rust:0.3.1
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Deploy and test
Expand Down
26 changes: 6 additions & 20 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,11 @@ networks: # omit if no Internet Identity needed
canisters:
- name: backend
recipe:
type: https://raw.githubusercontent.com/dfinity/icp-cli-recipes/bc9581d9258d2d7feb15ab4ae8d04baf923b985f/recipes/motoko/recipe.hbs
# TODO: replace with @dfinity/motoko@vX.Y.Z once https://github.com/dfinity/icp-cli-recipes/pull/26 merges
configuration:
name: backend # must match [canisters.backend] key in mops.toml
type: "@dfinity/motoko@v5.0.0"

- name: frontend
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: frontend/dist
build:
Expand All @@ -129,7 +126,7 @@ canisters:

- name: frontend
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: frontend/dist
build:
Expand All @@ -145,7 +142,7 @@ canisters:

```toml
[toolchain]
moc = "1.8.2"
moc = "1.9.0"

[dependencies]
core = "2.5.0"
Expand All @@ -161,7 +158,7 @@ main = "backend/app.mo"
candid = "backend/backend.did"
```

`[canisters.<name>]` replaces the `main`, `candid`, and `args` fields that were previously in `icp.yaml`. The `name` key must match the `name` in the recipe configuration. `--default-persistent-actors` makes all actors persistent by default, so the `persistent` keyword is not needed in source files.
`[canisters.<name>]` replaces the `main`, `candid`, and `args` fields that were previously in `icp.yaml`. The `@dfinity/motoko@v5.0.0` recipe reads this section directly, so the Motoko canister needs no `configuration:` block in `icp.yaml` — the `<name>` must match the canister `name` in `icp.yaml`. `--default-persistent-actors` makes all actors persistent by default, so the `persistent` keyword is not needed in source files.

---

Expand Down Expand Up @@ -314,23 +311,12 @@ Rust: `icp build backend && candid-extractor target/wasm32-unknown-unknown/relea
## Pending items (do not resolve prematurely)

### Container images
Images are published at `ghcr.io/dfinity/icp-dev-env-{motoko,rust,all}`. All devcontainer configs and CI workflows reference the pinned tag (e.g. `0.1.0`). When a new release is cut, update the tag in:
Images are published at `ghcr.io/dfinity/icp-dev-env-{motoko,rust,all}`. All devcontainer configs and CI workflows reference the pinned tag (e.g. `0.3.1`). When a new release is cut, update the tag in:
- `.devcontainer/devcontainer.json`
- `.github/workflows/*.yml`

Source: https://github.com/dfinity/icp-dev-env

### Motoko recipe version
Both `motoko/who_am_i/icp.yaml` and `motoko/hello_world/icp.yaml` pin a specific commit SHA of the Motoko recipe to pick up `[moc] args` support from `mops.toml` before it ships in a stable release:

```yaml
type: https://raw.githubusercontent.com/dfinity/icp-cli-recipes/bc9581d9258d2d7feb15ab4ae8d04baf923b985f/recipes/motoko/recipe.hbs
```

Tracked in: https://github.com/dfinity/icp-cli-recipes/pull/26

Once that PR merges and a new `@dfinity/motoko` version is released, replace the raw URL in both files with the versioned tag (e.g. `@dfinity/motoko@vX.Y.Z`).

---

## dfx → icp-cli migration checklist
Expand Down
6 changes: 2 additions & 4 deletions motoko/hello_world/icp.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
canisters:
- name: backend
recipe:
type: https://raw.githubusercontent.com/dfinity/icp-cli-recipes/bc9581d9258d2d7feb15ab4ae8d04baf923b985f/recipes/motoko/recipe.hbs
configuration:
name: backend
type: "@dfinity/motoko@v5.0.0"

- name: frontend
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: frontend/dist
build:
Expand Down
6 changes: 2 additions & 4 deletions motoko/who_am_i/icp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ networks:
canisters:
- name: backend
recipe:
type: https://raw.githubusercontent.com/dfinity/icp-cli-recipes/bc9581d9258d2d7feb15ab4ae8d04baf923b985f/recipes/motoko/recipe.hbs
configuration:
name: backend
type: "@dfinity/motoko@v5.0.0"

- name: frontend
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: src/frontend/dist
build:
Expand Down
2 changes: 1 addition & 1 deletion rust/hello_world/icp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ canisters:

- name: frontend
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: frontend/dist
build:
Expand Down
6 changes: 2 additions & 4 deletions rust/vetkeys/basic_bls_signing/motoko/icp.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
canisters:
- name: basic_bls_signing
recipe:
type: "@dfinity/motoko@v4.1.0"
configuration:
main: backend/src/Main.mo
type: "@dfinity/motoko@v5.0.0"
init_args:
type: text
value: "(\"test_key_1\")"

- name: www
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
build:
Expand Down
3 changes: 3 additions & 0 deletions rust/vetkeys/basic_bls_signing/motoko/mops.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ moc = "1.9.0"
core = "2.5.0"
ic-vetkeys = "0.5.0"
sha2 = "0.1.14"

[canisters.basic_bls_signing]
main = "backend/src/Main.mo"
2 changes: 1 addition & 1 deletion rust/vetkeys/basic_bls_signing/rust/icp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ canisters:

- name: www
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
build:
Expand Down
6 changes: 2 additions & 4 deletions rust/vetkeys/basic_ibe/motoko/icp.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
canisters:
- name: basic_ibe
recipe:
type: "@dfinity/motoko@v4.1.0"
configuration:
main: backend/src/Main.mo
type: "@dfinity/motoko@v5.0.0"
init_args:
type: text
value: "(\"test_key_1\")"

- name: www
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
build:
Expand Down
3 changes: 3 additions & 0 deletions rust/vetkeys/basic_ibe/motoko/mops.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ moc = "1.9.0"
core = "2.5.0"
ic-vetkeys = "0.5.0"
sha2 = "0.1.14"

[canisters.basic_ibe]
main = "backend/src/Main.mo"
2 changes: 1 addition & 1 deletion rust/vetkeys/basic_ibe/rust/icp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ canisters:

- name: www
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
build:
Expand Down
2 changes: 1 addition & 1 deletion rust/vetkeys/basic_timelock_ibe/icp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ canisters:

- name: www
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
build:
Expand Down
6 changes: 2 additions & 4 deletions rust/vetkeys/encrypted_notes_app_vetkd/motoko/icp.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
canisters:
- name: encrypted_notes
recipe:
type: "@dfinity/motoko@v4.1.0"
configuration:
main: backend/main.mo
type: "@dfinity/motoko@v5.0.0"
init_args:
type: text
value: "(\"test_key_1\")"

- name: www
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
build:
Expand Down
3 changes: 3 additions & 0 deletions rust/vetkeys/encrypted_notes_app_vetkd/motoko/mops.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ moc = "1.9.0"

[dependencies]
core = "2.5.0"

[canisters.encrypted_notes]
main = "backend/main.mo"
2 changes: 1 addition & 1 deletion rust/vetkeys/encrypted_notes_app_vetkd/rust/icp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ canisters:

- name: www
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
build:
Expand Down
6 changes: 2 additions & 4 deletions rust/vetkeys/password_manager/motoko/icp.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
canisters:
- name: ic_vetkeys_encrypted_maps_canister
recipe:
type: "@dfinity/motoko@v4.1.0"
configuration:
main: backend/src/Main.mo
type: "@dfinity/motoko@v5.0.0"
init_args:
type: text
value: "(\"test_key_1\")"

- name: www
recipe:
type: "@dfinity/asset-canister@v2.1.0"
type: "@dfinity/asset-canister@v2.2.1"
configuration:
dir: dist
build:
Expand Down
3 changes: 3 additions & 0 deletions rust/vetkeys/password_manager/motoko/mops.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ moc = "1.9.0"
[dependencies]
core = "2.5.0"
ic-vetkeys = "0.5.0"

[canisters.ic_vetkeys_encrypted_maps_canister]
main = "backend/src/Main.mo"
Loading
Loading