Installation

Quick Start Guide

This guide will help you set up and run Fermah Core locally.

Requirements

System Requirements

  • Docker or Orbstack
  • Rust and related tools
  • PostgreSQL client libraries
  • Sea-ORM CLI

Installation Steps

  1. Install Docker or Orbstack

  2. Install Rust and Required Tools

    # Install Rust
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
    # Install additional tools
    cargo install just
    rustup target add wasm32-unknown-unknown
    cargo install wasm-bindgen-cli --version 0.2.100
    cargo install deno --locked --version 2.1.5
    
  3. Install PostgreSQL Libraries

    # macOS
    brew install libpq
    
    # Ubuntu
    sudo apt install libpq-dev postgresql-client
    
  4. Install Sea-ORM CLI

    cargo install sea-orm-cli
    

Database Setup

  1. Reset the database:

    just db reset
    
  2. Start PostgreSQL server:

    just db restart
    

    Default credentials:

    • Username: postgres
    • Password: postgres

Running Fermah Core

Basic Commands

  • Build a workflow:

    just workflow build
    
  • Run the core:

    just run runtime
    
  • Run a prover node:

    just run start-new-prover-node
    
  • Upload and execute a workflow:

    just run upload-execute
    
  • Run everything in one command:

    just run runtime-upload-execute
    

Docker Integration

To run Docker tests:

  1. Build the Docker image:

    docker build -f Dockerfile -t py_test:latest .
    
  2. Build a workflow:

    cd crates/workflow/fermah-workflow-docker-module
    just workflow build
    
  3. Run prover node with Docker support:

    cargo run -p fermah-prover-node --features docker -- start
    

The Fermah Core architecture consists of three main components: the Runtime Client for input processing, the Core Services (Runtime, Database, and Workflow Jail) for orchestration, and the Prover Network for distributed proof generation.

Next Steps