Welcome to the IC Vibe Coding Bootcamp (Rust Edition)! This repository provides a high-quality, production-style template to help you kickstart Internet Computer (ICP) backend development using Rust, with best practices in testing, CI/CD, and developer experience.
Whether you're building your first ICP project or want a fast way to set up a maintainable Rust canister architecture, this template is your launchpad. 🚀
- ✨ Features
- 🚀 Getting Started
- 📁 Project Structure
- ✅ Testing Patterns
- 🔄 CI/CD Workflow
- 🧠 GitHub Copilot Integration
- 🔗 Resources & Documentation
- 📩 Submit Your Project!
- 🦀 Rust-based Canister Template
- 🧪 Test Suite: Powered by Vitest + PocketIC for realistic canister simulation
- 🔁 CI/CD: GitHub Actions to automate builds, tests, and code quality checks
- 📦 DFX Config: Pre-configured with best practices for Rust
- 🤖 Copilot Integration: Automatically generate structured tests & changelogs
A devcontainer is preconfigured for you to start coding instantly!
- Click on "Use this Template" → "Create a new repository".
- Click "Code → Open with Codespaces"
- Once the codespace is created, you can open it in VS Code Local
- Everything is pre-installed and ready for you to run the following commands
npm installdfx startKeep this tab open for reading logs.
Open a new tab, then:
dfx deploynpm testYou can also run:
npm test tests/src/vibe_coding_template_backend.test.ts # individual testICP-Bootcamp-Vibe-Coding/
├── src/
│ ├── vibe_coding_template_backend/ # Rust backend canister
│ │ ├── src/ # Rust source files
│ │ └── Cargo.toml # Rust dependencies
│ └── declarations/ # Auto-generated canister interfaces
├── tests/
│ ├── src/ # Test files
│ ├── global-setup.ts # PocketIC instance
│ └── vitest.config.ts # Vitest configuration
├── scripts/
│ ├── dev-container-setup.sh # Extra set up steps for codespace
│ └── generate-candid.sh # Useful one way script to build, generate candid and did files
├── dfx.json # ICP config
├── Cargo.toml # Root Rust workspace config
├── .github/instructions/ # Copilot general and language specific instructions
├── .github/prompts/ # Copilot Prompts, like add feature and changes review
├── .github/workflows/ # GitHub CI/CD pipelines
├── .devcontainer/devcontainer.json # Container config for running your own codespace
└── CHANGELOG.md
Located under .github/workflows/, this includes:
- 🧪 Automated end-2-end test runs
It could be extended to:
- check for security updates (audit);
- test coverage;
- code quality.
This project leverages two key customization folders:
.github/instructions/– Provides essential context to guide AI responses..github/prompts/– Defines workflow prompts to effectively assist you.
Think of the AI as a super-fast junior developer, handling the heavy lifting while you focus on quality control. Instead of using PRs, you’re reviewing and refining code directly in the IDE through Copilot chat.
Instructions provide "context" that applies to specific files using regex patterns defined in applyTo. They are ideal for project-wide or language-specific guidance.
Current Instructions:
- general:
applyTo: ** - rust:
applyTo: */*.rs - test:
applyTo: tests/**
Examples of Context You Can Define:
- This is an ICP project using Rust canisters.
- For Rust, we follow Clippy and Rust FMT style guides and linting tools.
- For tests, we use Pocket IC and maintain a specific test structure.
Prompts define specific tasks and guide the AI through a structured workflow. They are especially useful for maintaining a consistent development process.
/add-feature Add a function to decrease the counter valueIn this workflow, Copilot follows a Spec Driven Workflow:
- Clarification Phase: • Updates the changelog and asks for any necessary clarifications.
- Test First Approach: • Generates a test case and ensures it fails, confirming that the test is effectively targeting the desired behavior.
- Human Confirmation: • The AI pauses for a human to review and confirm the spec, ensuring alignment before proceeding.
- Implementation Phase: • Implements the code, self-checks for errors, installs necessary libraries, lints, formats, and runs tests to confirm they pass.
✅ Key Takeaways
When you explore the prompt, please notice:
- CRITICAL PAUSE POINTS
- Strategic pauses allow the human to verify the work in small, reviewable chunks and redirect if necessary.
- Command Explanations
- The prompt can include specific commands or scripts, guiding the AI in self-checking, running scripts, or managing dependencies.
- Task-Specific Advice
- The prompt is the place to add any specific guidance or notes relevant only to the particular task at hand.
To run a review, simply call the prompt:
/changes-reviewThe AI will analyze the current git diffs, then reference other files in the repo for context. It will generate a comprehensive report for you to review before committing.
-
Business Logic:
- Detects potential unwanted side effects or missing edge cases.
-
Code Quality:
- Suggests improvements or refactor opportunities.
-
Security & Performance:
- Identifies vulnerabilities or inefficiencies.
- AI can handle the heavy lifting, but it's your responsibility as the Senior to validate the findings.
- Double-check and ensure quality – small issues now can become big problems later. 😉
- Instruction and Prompt Files
- Agent Mode
- Copilot Reference
- ICP Dev Docs
- Rust CDK
- PicJS Doc
- Vitest Testing Framework
We welcome contributions! If you encounter a bug, have a feature request, or want to suggest improvements, please open an issue or submit a Pull Request.
We especially welcome candidates of limits you face, consider using the Limit Candidate Form Issue – it helps us prioritize and address the most impactful limits effectively.
🎯 Completed your challenge? Submit your project here:
📢 Submission Form
📌 Want to explore more challenges? Return to the index:
🔗 IC Vibe Coding Bootcamp Index
Now go build something fast, tested, and production-ready 🚀🦀