githubEdit

Development Setup

This guide covers setting up your development environment for spuff.

Prerequisites

Required

  • Rust 1.75+ - Install via rustuparrow-up-right

  • Git - For version control

  • SSH client - For testing VM connections

  • cargo-watch - Auto-rebuild on changes

  • cargo-zigbuild - Cross-compilation to Linux

  • sqlite3 - For inspecting local state

Installation

1. Install Rust

# Install rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Verify installation
rustc --version
cargo --version

2. Clone the Repository

3. Build

4. Verify

Optional Tools

cargo-watch

Auto-rebuild on file changes:

cargo-zigbuild

Cross-compile the agent for Linux (required if developing on macOS):

SQLite CLI

Inspect local state database:

IDE Setup

VS Code

Recommended extensions:

  • rust-analyzer - Rust language support

  • Even Better TOML - Cargo.toml syntax

  • crates - Dependency version info

  • CodeLLDB - Debugging support

Settings (.vscode/settings.json):

JetBrains (RustRover/IntelliJ)

  1. Install Rust plugin

  2. Open project directory

  3. Configure toolchain in Settings > Languages > Rust

Cloud Provider Setup

DigitalOcean

  1. Generate API token: API > Generate New Token

  2. Set environment variable:

  1. Upload SSH key: Settings > Security > SSH Keys

Hetzner (for development)

  1. Create account at hetzner.comarrow-up-right

  2. Generate API token: Security > API Tokens

  3. Set environment variable:

SSH Key Setup

Ensure you have an SSH key:

Configuration

Create a test configuration:

Running Locally

CLI Commands

Agent (Local Testing)

The agent typically runs on VMs, but you can test locally:

Development Workflow

Feature Development

Testing Changes on Real VMs

Troubleshooting

Build Errors

Permission Denied on SSH Key

Agent Not Starting

Check systemd logs on the VM:

State Database Issues

Reset local state:

Next Steps

Last updated

Was this helpful?