Skip to content

Development Setup

Set up your development environment for contributing to sigc.

Prerequisites

Required

  • Rust (latest stable): Install Rust
  • Git: Version control
  • Python 3.8+: For pysigc development
  • VSCode with rust-analyzer
  • Docker: For testing in containers

Clone the Repository

Bash
git clone https://github.com/skelf-Research/sigc.git
cd sigc

Build

Debug Build

Bash
cargo build

Release Build

Bash
cargo build --release

Build All Crates

Bash
cargo build --workspace

Run Tests

All Tests

Bash
cargo test --workspace

Specific Crate

Bash
cargo test -p sig_parser
cargo test -p sig_runtime

Integration Tests

Bash
cargo test --test integration

Code Quality

Linting

Bash
cargo clippy --workspace

Formatting

Bash
# Check
cargo fmt --check

# Auto-format
cargo fmt

Type Checking

Bash
cargo check --workspace

Project Structure

Text Only
sigc/
├── crates/
│   ├── sigc/          # Main CLI
│   ├── sig_parser/    # DSL parser
│   ├── sig_runtime/   # Execution engine
│   └── sig_types/     # Type definitions
├── pysigc/            # Python bindings
├── docs/              # Legacy documentation
├── documentation/     # New MkDocs documentation
├── strategies/        # Example strategies
└── tests/             # Integration tests

Development Workflow

1. Create Branch

Bash
git checkout -b feature/my-feature

2. Make Changes

Edit code, add tests.

3. Test Locally

Bash
cargo test
cargo clippy
cargo fmt

4. Commit

Bash
git add .
git commit -m "feat: add new feature"

5. Push

Bash
git push -u origin feature/my-feature

6. Open PR

Go to GitHub and create a Pull Request.

Python Development

Set Up Python Environment

Bash
cd pysigc

# Create virtual environment
python -m venv venv
source venv/bin/activate

# Install development dependencies
pip install -e ".[dev]"

Build Python Bindings

Bash
maturin develop

Test Python

Bash
pytest

Documentation Development

Set Up MkDocs

Bash
cd documentation
pip install -r requirements.txt

Preview Locally

Bash
mkdocs serve
# Open http://localhost:8000

Build

Bash
mkdocs build

IDE Setup

VSCode

Install extensions: - rust-analyzer - Even Better TOML - CodeLLDB (for debugging)

Settings (.vscode/settings.json):

JSON
{
    "rust-analyzer.checkOnSave.command": "clippy",
    "editor.formatOnSave": true
}

IntelliJ/CLion

Install the Rust plugin.

Debugging

Debug Build

Bash
cargo build
./target/debug/sigc run strategy.sig

With LLDB

Bash
lldb ./target/debug/sigc -- run strategy.sig

Verbose Logging

Bash
RUST_LOG=debug cargo run -- run strategy.sig

Common Issues

Build Failures

Bash
# Update dependencies
cargo update

# Clean build
cargo clean && cargo build

Test Failures

Bash
# Run specific test with output
cargo test test_name -- --nocapture

See Also