chore: migrate rust/photo_gallery to icp-cli#1406
Draft
marc0olo wants to merge 1 commit into
Draft
Conversation
- Replace dfx.json with icp.yaml using @dfinity/rust@v3.3.0 and @dfinity/asset-canister@v2.2.1 - Rename backend package from pictures-site-backend to backend; update Cargo.toml and Cargo.lock - Rename pictures-site-backend.did to backend.did - Add rust-toolchain.toml - Replace dfx-generated declarations with @icp-sdk/bindgen (icpBindgen Vite plugin) - Add frontend/src/actor.js using safeGetCanisterEnv from @icp-sdk/core - Update frontend/vite.config.js to use icpBindgen plugin; remove vite-plugin-environment - Update App.tsx to import from actor.js; fix image URL construction to use canister env - Add Makefile with tests for upload_image, list_images, and http_request - Add CI workflow (.github/workflows/photo_gallery.yml) for rust-photo_gallery job - Delete dfx.json, BUILD.md, .devcontainer/, tsconfig.json (root), .env 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.0and@dfinity/asset-canister@v2.2.1pictures-site-backendtobackend; updatesCargo.toml,Cargo.lock, and renames.didfile tobackend.did@icp-sdk/bindgen(icpBindgenVite plugin); addsfrontend/src/actor.jsusingsafeGetCanisterEnvvite.config.jsto use the bindgen plugin and removesvite-plugin-environment/dotenvdependenciesApp.tsxto import fromactor.jsand fixes image URL construction to use canister env instead of DFX-specific env varsMakefilewith 6 tests coveringupload_image,list_images, andhttp_request(including 404 case)photo_gallery.ymlfor therust-photo_galleryjob usingghcr.io/dfinity/icp-dev-env-rust:1.0.0dfx.json,BUILD.md,.devcontainer/, roottsconfig.json, and old.didfileTest plan
icp network start -d && icp deploycompletes successfullymake testpasses all 6 tests🤖 Generated with Claude Code