Skip to content

Rust Documentation

The Aranet project provides comprehensive Rust API documentation generated from inline doc comments using rustdoc.

  1. Clone the repository

    Terminal window
    git clone https://github.com/cameronrye/aranet.git
    cd aranet
  2. Generate the documentation

    Terminal window
    cargo doc --workspace --no-deps --open
  3. Browse the docs

    Your browser will open automatically with the documentation for all crates.

CrateDescription
aranet-typesPlatform-agnostic types shared between native and WASM
aranet-coreCore BLE library with device discovery, readings, and settings
aranet-storeSQLite-based data persistence for readings and history
aranet-serviceBackground collector and HTTP REST API server
aranet-cliCommand-line interface for quick readings and data export
aranet-tuiTerminal UI dashboard for real-time monitoring
aranet-guiDesktop GUI application
aranet-wasmWebAssembly module for browser-based sensor access

All public APIs are documented with:

  • Function/method descriptions - What the function does
  • Parameters - Description of each parameter
  • Return values - What the function returns
  • Examples - Usage examples where applicable
  • Errors - Possible error conditions
use aranet_core::{scan_for_devices, connect, read_current};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Scan for nearby Aranet devices
let devices = scan_for_devices(Duration::from_secs(5)).await?;
// Connect to the first device found
if let Some(device) = devices.first() {
let connection = connect(device).await?;
// Read current sensor values
let reading = read_current(&connection).await?;
println!("CO₂: {} ppm", reading.co2);
}
Ok(())
}

Made with ❤️ by Cameron Rye