chore: migrate wasm/counter to icp-cli#1437
Merged
Merged
Conversation
- Replace dfx.json with icp.yaml using a custom script build step; wat2wasm writes directly to $ICP_WASM_OUTPUT_PATH - Add test.sh covering get/inc/set - Update README with icp-cli instructions and fix IC System API link - Add wasm_counter CI workflow (installs wabt, runs deploy + test) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The icp-dev-env container cleans apt lists at build time; update is required before any apt install. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a candid:service custom section to the compiled WASM so the CLI can read the interface without warnings — the same thing Rust/Motoko toolchains do automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
wasm/counter has no Motoko or Rust toolchain dependency; the all image is more appropriate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
raymondk
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
icp.yaml: single custom canister with a two-step script build:wat2wasm counter.wat -o counter.wasmthenic-wasm counter.wasm -o "$ICP_WASM_OUTPUT_PATH" metadata candid:service -f counter.did -v public— embeds the Candid interface as a custom section so the CLI can read it without warnings, the same thing Rust/Motoko toolchains do automaticallydfx.jsontest.sh: coversget(initial 0),inc(+1),get(1),set 42,get(42)README.md: updated to icp-cli instructions; fixed IC System API link todocs.internetcomputer.orgwasm_counter.yml): usesghcr.io/dfinity/icp-dev-env-all:1.0.1(no language-specific toolchain needed), runsapt-get update && apt-get install -y wabt, thenicp deploy+bash test.shTest plan
icp network start -d && icp deploy && bash test.shpasses locally🤖 Generated with Claude Code