1 unstable release

new 0.1.0 Jan 14, 2025

#1563 in Network programming

Download history 77/week @ 2025-01-12

77 downloads per month

MIT license

165KB
2.5K SLoC

hyveOS SDK

A Rust SDK for the hyveOS system

Installation

Make sure you've installed hyveOS. Select a version of the SDK compatible with your local hyveOS version

[dependencies]
hyveos-sdk = "0.1.0"

Usage

See the service docs for an extensive description of the available services or the tutorials page for a hands-on quickstart.

Example Usage

use hyveos_sdk::Connection;
use futures::TryStreamExt as _;

#[tokio::main]
async fn main() {
    let connection = Connection::new().await.unwrap();

    let mut req_resp_service = connection.req_resp();
    let mut requests = req_resp_service.recv(None).await.unwrap();

    while let Some((request, handle)) = requests.try_next().await.unwrap() {
        let string = String::from_utf8(request.data).unwrap();
        println!("Received request from {}: {string}", request.peer_id);
        
        handle.respond("Hello from the other side!").await.unwrap();
    }
}

Dependencies

~10–25MB
~377K SLoC