cargo install justjust cijust fmt # Format all code
just fmt-check # Check formatting without changesjust clippy # Run Clippy lints
just lint # Run all lints (format + clippy)just build # Build debug WASM
just build-release # Build release WASM
just check-size # Build and check WASM sizejust test # Run unit tests
just test-coverage # Run tests with coveragejust fix # Auto-fix formatting and clippy issuesjust clean # Clean build artifacts
just audit # Run security audit
just docs # Generate documentationVersion: 1.79.0
Components: rustfmt, clippy
Target: wasm32-unknown-unknown
rustc --version
# Should output: rustc 1.79.0rustup updateBefore submitting a PR, run:
# 1. Format code
just fmt
# 2. Run all checks
just ci
# 3. Commit if all pass
git add .
git commit -m "your message"
git push| Job | Purpose | Duration |
|---|---|---|
| rust-checks | Format & lint | ~2-3 min |
| build-wasm | Build & size check | ~3-5 min |
| run-tests | Unit tests | ~1-2 min |
| security-audit | Security scan | ~1-2 min |
| ci-summary | Aggregate results | ~30 sec |
Maximum: 64 KB
Check: just check-size
- Review dependencies
- Optimize data structures
- Use references instead of cloning
- Run
just optimize
just fmt
git add .
git commit -m "style: format code"just fix # Auto-fix if possible
# Manual fixes for remaining warningsjust test # See detailed outputjust clean
just build-releaseIf you don't have Just installed:
cd contracts/prediction_market
cargo fmt --allcd contracts/prediction_market
cargo clippy --all-targets --all-features -- -D warningscd contracts/prediction_market
cargo build --target wasm32-unknown-unknown --releasecd contracts/prediction_market
cargo test --lib -- --nocapturecd contracts/prediction_market
stat -c%s target/wasm32-unknown-unknown/release/prediction_market.wasm- Go to your PR on GitHub
- Click "Checks" tab
- View job details and summaries
- Go to Actions tab
- Click on workflow run
- Download "prediction-market-wasm" artifact
just auditgrep -r "unsafe" contracts/prediction_market/src/just docsOpens in browser automatically after generation.
# Use cargo-watch for continuous testing
cargo install cargo-watch
just watch# Use sccache for caching
cargo install sccache
export RUSTC_WRAPPER=sccache- Max width: 100 characters
- Tab spaces: 4
- Trailing comma: Vertical
- Edition: 2021
- MSRV: 1.70.0
- All warnings as errors
- No
println!ordbg!in production
just outdatedjust update1. Write code
2. Run `just ci`
3. Fix issues
4. Commit & push
5. CI runs automatically
6. Review PR checks
7. Merge when green
Error: cargo fmt --check fails
Fix: Run just fmt
Error: Clippy warnings
Fix: Run just fix or fix manually
Error: WASM > 64KB
Fix: Optimize code, run just optimize
Error: Tests fail
Fix: Debug with just test
- Debug WASM: ~80-100 KB
- Release WASM: ~40-50 KB
- Optimized WASM: ~35-45 KB
- Format check: ~10 sec
- Clippy: ~30-60 sec
- Build: ~2-3 min
- Tests: ~30-60 sec
β
All checks pass
β
WASM < 64KB
β
Zero warnings
β
All tests pass
β
Green checkmarks on PR
Quick Help: Run just to see all available commands
Full Docs: See SOROBAN_CI_README.md
Rust Version: 1.79.0