Development

Circuit Development

This guide covers the development tools and frameworks for writing circuits with our supported proof systems.

Remember: You only need to focus on writing your circuits - Fermah handles all proof generation infrastructure.

Groth16

Core Tools

  • circom
    • Industry-standard circuit compiler
    • R1CS constraint system
    • Extensive library ecosystem
    • Built-in testing framework

Libraries

  • circomlib
    • Standard circuit templates
    • Common cryptographic primitives
    • Utility functions
    • Reference implementations

Example Usage

pragma circom 2.0.0;

template Multiplier() {
    signal input a;
    signal input b;
    signal output c;
    
    c <== a * b;
}

component main = Multiplier();

RISC Zero {#risc-zero}

Development Kit

  • RISC Zero zkVM
    • Write guest programs in Rust
    • Standard Rust toolchain support
    • Rich standard library access
    • Familiar development experience

Example Usage

use risc0_zkvm::guest::env;

risc0_zkvm::guest::entry!(main);

pub fn main() {
    // Read the input
    let value: u32 = env::read();
    
    // Perform computation
    let result = value * value;
    
    // Write the output
    env::commit(&result);
}

Valida

Core Framework

  • Valida SDK
    • LLVM-based circuit generation
    • Multiple language support
    • Advanced optimization features
    • Debug tooling

Key Features

  • Write circuits in high-level languages
  • Automatic constraint generation
  • Built-in optimization passes
  • Comprehensive testing tools

Stwo

Development Framework

  • Stwo Tools
    • StarkWare's circuit framework
    • Advanced constraint systems
    • Optimization primitives
    • Debug utilities

Key Features

  • Efficient constraint generation
  • Advanced cryptographic primitives
  • Built-in optimization tools
  • Comprehensive testing suite

SP1

Core SDK

  • Succinct SDK
    • Modern development toolkit
    • Circuit optimization tools
    • Extensive testing features
    • Debug utilities

Key Features

  • High-level circuit abstractions
  • Performance optimization tools
  • Comprehensive testing framework
  • Developer-friendly APIs

Next Steps

  1. Set up your development environment
  2. Learn about testing tools
  3. Explore example projects
Previous
Development Environments