Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
86422b2
refactor: split into core crate
0xpantera Jun 24, 2025
869a533
phase-2: cleanup helpers, dedup enum, clippy green
0xpantera Jun 25, 2025
9e78d33
Extract nargo command execution into common helper
0xpantera Jun 25, 2025
b268e04
Add smoke tests for CLI commands with dry-run flag
0xpantera Jun 25, 2025
5e8ff96
Add CHANGELOG.md detailing changes
0xpantera Jun 25, 2025
1b1bcd4
Add comprehensive test coverage for backend trait system
0xpantera Jun 25, 2025
08d31be
Add Cairo backend implementation for Starknet proofs
0xpantera Jun 25, 2025
f827d14
Add EVM backend implementation and trait bindings
0xpantera Jun 25, 2025
f9a3729
Add unified backend trait and polymorphic command dispatch
0xpantera Jun 25, 2025
3736a7b
Add any() downcasting and make Backend methods mutable
0xpantera Jun 25, 2025
62a497a
Add auto-declare feature to Cairo deploy command
0xpantera Jun 25, 2025
f24e62b
Add runner abstraction and auto-declare functionality
0xpantera Jun 25, 2025
f0cbf83
Refactor backend configuration and deployment workflow
0xpantera Jun 25, 2025
0c173d2
Remove Cairo declare command and refactor deploy config
0xpantera Jun 25, 2025
0139a61
Add integration test for auto-declare vs no-declare output
0xpantera Jun 25, 2025
5047b3e
Migrate bb calls to use command runner abstraction
0xpantera Jun 25, 2025
16c34f9
Remove direct command execution in backend modules
0xpantera Jun 25, 2025
73051b7
Add Config param to Garaga command functions
0xpantera Jun 25, 2025
d8b1993
Add foundry commands to runner abstraction
0xpantera Jun 25, 2025
2ae3d21
Consolidate command execution through runner abstraction
0xpantera Jun 25, 2025
4e3f821
Remove foundry backend run with output function
0xpantera Jul 1, 2025
fe1448c
Remove old garaga backend implementation
0xpantera Jul 1, 2025
1690581
Unify command execution into run_tool functions
0xpantera Jul 1, 2025
b172f97
Add runner history and capture functionality
0xpantera Jul 1, 2025
b87936f
Add serde_json dependency
0xpantera Jul 1, 2025
3e1c79e
Enhance DryRunRunner with realistic test outputs
0xpantera Jul 1, 2025
4740f4a
Refactor file I/O and formatting utilities
0xpantera Jul 1, 2025
cbbbe56
Add thiserror dependency
0xpantera Jul 1, 2025
554e014
Add comprehensive error handling docs and tests
0xpantera Jul 1, 2025
34b106f
Add error handling and error types for Cairo backend
0xpantera Jul 1, 2025
941efe9
Add error handling and dedicated EVM error types
0xpantera Jul 1, 2025
52d9964
Improve error messages with WrapErr
0xpantera Jul 1, 2025
0518b56
Add assert_fs and path-slash dependencies
0xpantera Jul 1, 2025
447b369
Add modular integration test framework with snapshots - Add integration
0xpantera Jul 1, 2025
8b47c42
Release version 0.2.0
0xpantera Jul 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,30 @@ jobs:
- name: cargo clippy (deny warnings)
run: cargo clippy --workspace --all-features --locked -- -D warnings

# -- Step 6: Run the test suite
# -- Step 6: Install Foundry for EVM tests
- name: Install Foundry
run: |
curl -L https://foundry.paradigm.xyz | bash
source ~/.bashrc
foundryup
echo "$HOME/.foundry/bin" >> $GITHUB_PATH

# -- Step 7: Install nargo for Noir compilation
- name: Install nargo
run: |
curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash
source ~/.bashrc
noirup
echo "$HOME/.nargo/bin" >> $GITHUB_PATH

# -- Step 8: Install bb for proof generation
- name: Install bb
run: |
curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/refs/heads/master/barretenberg/bbup/install | bash
source ~/.bashrc
bbup
echo "$HOME/.bb/bin" >> $GITHUB_PATH

# -- Step 9: Run the test suite
- name: cargo test
run: cargo test --workspace --all-features --locked
71 changes: 71 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.2.0]

### Added
- Runner abstraction with `CmdSpec`, `Runner` trait, `RealRunner`, and `DryRunRunner` implementations
- `run_capture()` method to Runner trait for stdout capture functionality
- Command history tracking in `DryRunRunner` with `history()` and `clear_history()` methods
- Unified `run_tool()` and `run_tool_capture()` helpers for all external command execution
- Auto-declare functionality for Cairo deploy command with `--auto-declare` and `--no-declare` flags
- Realistic fake output generation in `DryRunRunner::run_capture()` for better testing
- Enhanced command history tracking in `DryRunRunner` with captured output storage
- Backend trait methods now use `&mut self` for stateful operations (mutability upgrade)
- Comprehensive test coverage for auto-declare functionality (10 new tests)
- Comprehensive test coverage for runner abstraction (14 new unit tests)
- New `run_nargo_command` helper in `commands::common` for consolidated command execution
- Comprehensive smoke test coverage for all major commands (14 tests total)
- Test cases for check, clean, rebuild, cairo gen, and evm gen commands
- Test coverage for verbose, dry-run, and package flag combinations
- Comprehensive rustdoc documentation for new helper functions
- Integration test framework with golden file snapshots for `bargo build` and `cairo prove` workflows
- Cross-platform path handling in integration tests using `path-slash` crate
- Thread-safe test execution with `ScopedDir` guard to prevent parallel test race conditions
- Fixture-based testing with `simple_circuit` test project in `tests/fixtures/`
- Golden snapshot comparison for build artifacts in `tests/goldens/` directory
- `DryRunRunner`-based integration tests that verify command execution without running external tools

### Changed
- Command execution now uses runner abstraction for consistent dry-run and real execution modes
- All external tool commands (bb, garaga, forge, nargo) now use unified `run_tool()` interface
- Stdout capture operations (garaga calldata, foundry deploy) now use `run_tool_capture()`
- Config struct now includes `runner` field with `Arc<dyn Runner>` for command execution
- `DryRunRunner::run_capture()` now returns tool-specific fake output instead of generic placeholder
- `DryRunRunner::history()` now returns `Vec<(CmdSpec, Option<String>)>` to include captured output
- Migrated `run_nargo_command` to use runner abstraction instead of direct backend calls
- Cairo deploy command now auto-declares contracts by default (improves newcomer experience)
- Backend implementations now support stateful operations through mutable references
- Backend configuration now uses `configure()` method instead of down-casting for type-specific settings
- Improved dry-run mode handling for Cairo workflows
- Refactored `check` command to use consolidated helper pattern (reduced from 15 to 2 lines)
- Refactored `build` and `rebuild` commands to use consolidated helper pattern
- Improved quiet flag handling in verbose logging output

### Removed
- `cairo declare` command (use `cairo deploy --auto-declare` instead for automatic declaration and deployment)
- `as_any_mut()` method and RTTI down-casting from Backend trait (replaced with `configure()` method)
- All legacy backend helper functions (`backends::bb::run`, `backends::nargo::run`, etc.)
- Direct `std::process::Command` usage outside of `runner.rs` module
- Tool-specific command helpers (replaced with unified `run_tool()` interface)
- Enhanced global flag propagation consistency across all commands
- Deprecated helper functions: `run_bb_command()`, `run_garaga_command()`, `run_foundry_command()`
- Legacy `tests/integration.rs` single-file integration test (replaced with modular `tests/*_integration.rs` files)
- All commands now properly honor --pkg, --verbose, --dry-run, and --quiet flags

### Fixed
- Removed unused imports causing compiler warnings
- Fixed code to compile cleanly with `RUSTFLAGS="-D warnings"`
- Ensured dry-run mode properly bypasses filesystem operations and external commands
- Fixed test failures for cairo and evm commands by providing required package overrides

### Internal
- Consolidated argument building, logging, and dry-run handling patterns
- Eliminated code duplication across command modules
- Established consistent command execution pattern for all nargo-based commands
- Verified no unsafe blocks remain in codebase
- All acceptance criteria for Phase 3 satisfied
Loading
Loading