From d2dfec88ef6826f8269f5c5f74b5bd26c4d64ae9 Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Thu, 11 Jun 2026 00:16:25 +0200 Subject: [PATCH] feat: add candid-extractor to rust/all images, bump icp-cli to 0.3.2 Fixes #33 by installing candid-extractor via cargo-binstall, which uses the pre-built binary on amd64 and falls back to cargo install on arm64. Bumps icp-cli from 0.3.1 to 0.3.2 across all images and updates README. Co-Authored-By: Claude Sonnet 4.6 --- README.md | 14 ++++++++------ all/Dockerfile | 7 ++++++- motoko/Dockerfile | 2 +- rust/Dockerfile | 7 ++++++- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 51f5476..63b6301 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ For Motoko canister development. | Tool | Version | |---|---| -| [icp-cli](https://cli.internetcomputer.org) | 0.3.1 | +| [icp-cli](https://cli.internetcomputer.org) | 0.3.2 | | [ic-wasm](https://github.com/dfinity/ic-wasm) | 0.9.11 | | [mops](https://mops.one) | 2.13.2 | | moc | installed per-project via `mops install` | @@ -19,7 +19,7 @@ For Motoko canister development. ```bash docker pull ghcr.io/dfinity/icp-dev-env-motoko:latest # always current -docker pull ghcr.io/dfinity/icp-dev-env-motoko:0.3.1 # pinned +docker pull ghcr.io/dfinity/icp-dev-env-motoko:0.3.2 # pinned ``` ### `icp-dev-env-rust` @@ -28,8 +28,9 @@ For Rust canister development. | Tool | Version | |---|---| -| [icp-cli](https://cli.internetcomputer.org) | 0.3.1 | +| [icp-cli](https://cli.internetcomputer.org) | 0.3.2 | | [ic-wasm](https://github.com/dfinity/ic-wasm) | 0.9.11 | +| [candid-extractor](https://github.com/dfinity/cdk-rs) | 0.1.4 | | Rust | 1.95.0 | | wasm32-unknown-unknown target | — | | Node.js | 24.15.0 | @@ -37,7 +38,7 @@ For Rust canister development. ```bash docker pull ghcr.io/dfinity/icp-dev-env-rust:latest # always current -docker pull ghcr.io/dfinity/icp-dev-env-rust:0.3.1 # pinned +docker pull ghcr.io/dfinity/icp-dev-env-rust:0.3.2 # pinned ``` ### `icp-dev-env-all` @@ -46,8 +47,9 @@ Combined Motoko and Rust development environment. Use this when your project inc | Tool | Version | |---|---| -| [icp-cli](https://cli.internetcomputer.org) | 0.3.1 | +| [icp-cli](https://cli.internetcomputer.org) | 0.3.2 | | [ic-wasm](https://github.com/dfinity/ic-wasm) | 0.9.11 | +| [candid-extractor](https://github.com/dfinity/cdk-rs) | 0.1.4 | | [mops](https://mops.one) | 2.13.2 | | moc | installed per-project via `mops install` | | Rust | 1.95.0 | @@ -57,7 +59,7 @@ Combined Motoko and Rust development environment. Use this when your project inc ```bash docker pull ghcr.io/dfinity/icp-dev-env-all:latest # always current -docker pull ghcr.io/dfinity/icp-dev-env-all:0.3.1 # pinned +docker pull ghcr.io/dfinity/icp-dev-env-all:0.3.2 # pinned ``` ## Usage diff --git a/all/Dockerfile b/all/Dockerfile index 39db0b2..f7aedd6 100644 --- a/all/Dockerfile +++ b/all/Dockerfile @@ -3,8 +3,9 @@ FROM rust:1.95.0-slim-bookworm ARG NODE_VERSION=24.15.0 ARG NVM_VERSION=v0.40.1 ARG PNPM_VERSION=11.4.0 -ARG ICP_CLI_VERSION=0.3.1 +ARG ICP_CLI_VERSION=0.3.2 ARG IC_WASM_VERSION=0.9.11 +ARG CANDID_EXTRACTOR_VERSION=0.1.4 ARG IC_MOPS_VERSION=2.13.2 ENV NVM_DIR=/root/.nvm @@ -29,5 +30,9 @@ RUN npm install -g @icp-sdk/icp-cli@${ICP_CLI_VERSION} @icp-sdk/ic-wasm@${IC_WAS # wasm32 target for Rust canister compilation RUN rustup target add wasm32-unknown-unknown +# candid-extractor — uses pre-built binary on amd64, falls back to cargo install on arm64 +RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash && \ + cargo binstall --no-confirm candid-extractor@${CANDID_EXTRACTOR_VERSION} + # mops (Motoko package manager) — moc is installed per-project via mops install RUN npm install -g ic-mops@${IC_MOPS_VERSION} diff --git a/motoko/Dockerfile b/motoko/Dockerfile index e7520b5..b335691 100644 --- a/motoko/Dockerfile +++ b/motoko/Dockerfile @@ -3,7 +3,7 @@ FROM debian:bookworm-slim ARG NODE_VERSION=24.15.0 ARG NVM_VERSION=v0.40.1 ARG PNPM_VERSION=11.4.0 -ARG ICP_CLI_VERSION=0.3.1 +ARG ICP_CLI_VERSION=0.3.2 ARG IC_WASM_VERSION=0.9.11 ARG IC_MOPS_VERSION=2.13.2 diff --git a/rust/Dockerfile b/rust/Dockerfile index e43ec5e..671056c 100644 --- a/rust/Dockerfile +++ b/rust/Dockerfile @@ -3,8 +3,9 @@ FROM rust:1.95.0-slim-bookworm ARG NODE_VERSION=24.15.0 ARG NVM_VERSION=v0.40.1 ARG PNPM_VERSION=11.4.0 -ARG ICP_CLI_VERSION=0.3.1 +ARG ICP_CLI_VERSION=0.3.2 ARG IC_WASM_VERSION=0.9.11 +ARG CANDID_EXTRACTOR_VERSION=0.1.4 ENV NVM_DIR=/root/.nvm ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin:${PATH}" @@ -27,3 +28,7 @@ RUN npm install -g @icp-sdk/icp-cli@${ICP_CLI_VERSION} @icp-sdk/ic-wasm@${IC_WAS # wasm32 target for canister compilation RUN rustup target add wasm32-unknown-unknown + +# candid-extractor — uses pre-built binary on amd64, falls back to cargo install on arm64 +RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash && \ + cargo binstall --no-confirm candid-extractor@${CANDID_EXTRACTOR_VERSION}