Getting Started

Get up and running with Rohas in minutes. This guide will walk you through creating your first event-driven application.

Prerequisites

  • Rust 1.70 or higher (for installing Rohas CLI and Rust runtime)
  • Node.js 18+ (for TypeScript runtime) or Python 3.9+ (for Python runtime)
  • Cargo (Rust package manager)

Installation

Install the Rohas CLI using the recommended installation script:

curl -fsSL https://raw.githubusercontent.com/rohas-dev/rohas/main/scripts/build.sh | bash

This will automatically install all dependencies and build Rohas CLI.

Alternatively, install via Cargo:

cargo install rohas-cli

Verify the installation:

rohas version

Create Your First Project

Initialize a new Rohas project:

from generated.api.health import HealthRequest, HealthResponse from generated.state import State from datetime import datetime async def handle_health(req: HealthRequest, state: State) -> HealthResponse: return HealthResponse(status="ok", timestamp=datetime.now().isoformat())

Rust:

use crate::generated::api::health::{HealthRequest, HealthResponse}; use crate::generated::state::State; use rohas_runtime::Result; pub async fn handle_health( req: HealthRequest, state: &mut State, ) -> Result<HealthResponse> { Ok(HealthResponse { status: "ok".to_string(), timestamp: chrono::Utc::now().to_rfc3339(), }) }

Or start with the workbench UI for a better development experience:

rohas dev --workbench

Your API will be available at http://localhost:3000/health

Next Steps

  • Learn about defining schemas
  • Explore handler implementation
  • Check out examples
  • Read the CLI reference