Skip to content

chore: migrate wasm/counter to icp-cli#1437

Merged
raymondk merged 4 commits into
masterfrom
chore/migrate-wasm-counter-to-icp-cli
Jul 10, 2026
Merged

chore: migrate wasm/counter to icp-cli#1437
raymondk merged 4 commits into
masterfrom
chore/migrate-wasm-counter-to-icp-cli

Conversation

@marc0olo

@marc0olo marc0olo commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

  • icp.yaml: single custom canister with a two-step script build: wat2wasm counter.wat -o counter.wasm then ic-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 automatically
  • Deleted: dfx.json
  • test.sh: covers get (initial 0), inc (+1), get (1), set 42, get (42)
  • README.md: updated to icp-cli instructions; fixed IC System API link to docs.internetcomputer.org
  • CI workflow (wasm_counter.yml): uses ghcr.io/dfinity/icp-dev-env-all:1.0.1 (no language-specific toolchain needed), runs apt-get update && apt-get install -y wabt, then icp deploy + bash test.sh

Test plan

  • icp network start -d && icp deploy && bash test.sh passes locally
  • CI passes

🤖 Generated with Claude Code

marc0olo and others added 4 commits July 10, 2026 10:18
- 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>
@marc0olo marc0olo marked this pull request as ready for review July 10, 2026 08:30
@marc0olo marc0olo requested a review from a team as a code owner July 10, 2026 08:30
@raymondk raymondk merged commit 3da117b into master Jul 10, 2026
6 checks passed
@raymondk raymondk deleted the chore/migrate-wasm-counter-to-icp-cli branch July 10, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants