chore: migrate rust/unit_testable_rust_canister to icp-cli#1405
Draft
marc0olo wants to merge 1 commit into
Draft
chore: migrate rust/unit_testable_rust_canister to icp-cli#1405marc0olo wants to merge 1 commit into
marc0olo wants to merge 1 commit into
Conversation
- Replace dfx.json with icp.yaml using @dfinity/rust@v3.3.0 recipe - Move src/hello_canister/ to backend/, rename package to "backend" - Rename hello_canister.did to backend/backend.did - Update lib.rs candid_interface_compatibility test to reference backend.did - Update integration_tests.rs to use backend crate and backend.wasm paths - Add Makefile with test target exercising all public canister endpoints - Add CI workflow with cargo test --lib step plus icp deploy + make test - Delete old dfx-based CI workflow rust-unit-testable-rust-canister-example.yml - Update README with icp-cli deploy instructions, preserve architecture docs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
dfx.jsonwithicp.yamlusing@dfinity/rust@v3.3.0recipesrc/hello_canister/→backend/, rename Cargo package fromhello_canistertobackendhello_canister.did→backend/backend.did; updatelib.rscandid compatibility test to referencebackend.didbackend/tests/integration_tests.rsto import from thebackendcrate and referencebackend.wasmMakefilewithtesttarget exercising all 5 public endpoints (get_count,increment_count,decrement_count,get_proposal_info,get_proposal_titles)unit_testable_rust_canister.ymlwith acargo test --libstep (unit tests) plusicp deploy+make test; delete old dfx-based workflowREADME.mdwith icp-cli deploy instructions, preserve architecture/testing-strategy documentationTest plan
cargo test --libpasses (unit tests with mocked dependencies)icp network start -d && icp deploy && make testpasses on a clean local environmentrust-unit_testable_rust_canisterpasses in the new workflow🤖 Generated with Claude Code