#iot #data #data-storage #actix-web #mount #storage #module

bin+lib sylvia-iot-data

The data storage of Sylvia-IoT core modules

3 releases

new 0.0.3 Mar 17, 2023
0.0.2 Mar 10, 2023
0.0.1 Mar 5, 2023

#185 in HTTP server

Download history 33/week @ 2023-03-05 21/week @ 2023-03-12

54 downloads per month

MIT license

15K SLoC

crates.io Documentation CI Coverage Docker License


The data storage of Sylvia-IoT core modules.

Mount sylvia-iot-data in your Actix-Web App

You can simply mount sylvia-iot-data into your Actix-Web App:

use actix_web::{self, App, HttpServer};
use clap::App as ClapApp;
use sylvia_iot_data::{libs, routes};

async fn main() -> std::io::Result<()> {
    let args = ClapApp::new("your-project-name").get_matches();

    let conf = libs::config::read_args(&args);
    let data_state = match routes::new_state("/data", &conf).await {
        Err(e) => {
            println!("Error: {}", e);
            return Ok(());
        Ok(state) => state,
    HttpServer::new(move || App::new().service(routes::new_service(&data_state)))

Please see src/bin/sylvia-iot-data.rs to get the real world example.

All-in-one binary

You can use src/bin/sylvia-iot-core.rs as a single binary to run the whole sylvia-iot platform.


~1.5M SLoC