Skip to content

Quick Start Guide

Getting Started with Nerve Framework

This guide will help you get up and running with the Nerve Framework in minutes.

Prerequisites

  • Rust 1.70+ installed
  • Cargo package manager
  • Basic understanding of Rust

Installation

Add Nerve Framework to your Cargo.toml:

[dependencies]
nerve = "0.1.0"

Your First Nerve Application

Create a simple pub/sub application:

use nerve::prelude::*;
use nerve::communication::pubsub::{Publisher, Subscriber};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut publisher = Publisher::new();
    let mut subscriber = Subscriber::new();

    // Subscribe to a topic
    subscriber.subscribe("sensor.data").await?;

    // Publish a message
    publisher.publish("sensor.data", "temperature: 25.5").await?;

    Ok(())
}

Next Steps


This is a placeholder file. Full content coming soon.