Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces the dusk-forge CLI tool for Dusk contract development, providing scaffolding and build automation capabilities. The CLI adds four core commands (new, build, test, check) for managing contract projects, along with template rendering, toolchain management, and build orchestration. The PR also updates the contract template with working test harnesses and simplified counter examples.
Changes:
- Adds new
cli/crate withdusk-forgebinary and core contract development commands - Updates contract template with functional test harness and simplified event emission
- Adds workspace dependencies for CLI tooling (clap, colored, cargo_metadata, etc.)
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| cli/Cargo.toml | Defines CLI package with required dependencies |
| cli/src/main.rs | Main entry point routing commands to handlers |
| cli/src/cli.rs | Command-line argument definitions using clap |
| cli/src/commands/*.rs | Implementation of new, build, test, and check commands |
| cli/src/template/*.rs | Template rendering engine with name validation |
| cli/src/project/*.rs | Project detection and metadata loading |
| cli/src/toolchain.rs | Rust toolchain version management |
| cli/src/build_runner/*.rs | WASM build orchestration and optimization |
| cli/src/tools.rs | Executable path discovery |
| cli/src/ui.rs | User interface utilities for formatted output |
| cli/src/error.rs | Error type definitions |
| cli/tests/new_command.rs | Integration tests for the new command |
| cli/README.md | CLI documentation and usage examples |
| contract-template/Cargo.toml | Updates dusk-forge to 0.2.2 and adds pinned dependencies |
| contract-template/src/lib.rs | Simplifies event emission from structs to tuples |
| contract-template/tests/contract.rs | Adds complete test harness with deployment and mutation tests |
| Cargo.toml | Adds cli to workspace members and defines shared dependencies |
| tests/test-bridge/Cargo.toml | Adds uuid dependency for transitive pinning |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
moCello
left a comment
There was a problem hiding this comment.
Apart from the copilot findings on the toml import I can only remark that the changelog entry is missing
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef7ad9708a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
cli/src/build_runner/mod.rs
Outdated
| }; | ||
|
|
||
| const CONTRACT_FEATURE: &str = "contract"; | ||
| const DATA_DRIVER_FEATURE: &str = "data-driver-js"; |
There was a problem hiding this comment.
Use supported data-driver feature for data-driver builds
The data-driver build path is hardcoded to data-driver-js, but this commit’s own validation treats data-driver and data-driver-js as acceptable project shapes. That means projects that only define data-driver (a valid configuration per the checker and template docs) will pass check and then consistently fail dusk-forge build data-driver with an unknown feature error.
Useful? React with 👍 / 👎.
Summary
dusk-forgeCLI binary (cli/crate) with core contract development commandsnew: scaffold a project from counter or empty templatebuild: compile contract and/or data-driver WASM (defaults to both)test: build contract WASM then runcargo test --releasecheck: validate project structure, deps, and toolchaincontract-template/with working test harness and simplified counterStack