hubro-sdk 1.0.2

Hubro Platform SDK crate
docs.rs failed to build hubro-sdk-1.0.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: hubro-sdk-0.9.3

The Hubro SDK is a powerful Rust-based development kit designed for building high-performance plugins for the Hubro Platform.

Whether you're building server-side microservices or mobile-first data collection agents, this SDK provides the core infrastructure, security, and data standards compliance (HL7 FHIR) you need.


🚀 Key Features

🖥️ Server Side (feature = "server")

Optimized for Fermyon Spin and WebAssembly microservices.

  • HL7 FHIR Integration: Seamlessly handle medical data standards using fhirbolt.
  • Plugin Infrastructure: Built-in metadata, registration, and standard endpoints (/info, /authorize, /data).
  • Signal Handling: Efficient processing of platform events and signals.
  • Security: Robust JWT-based authentication and secure data handling.

📱 Mobile Side (feature = "mobile")

Designed for on-device edge processing and federated learning.

  • Platform Interfaces: Native-like interaction with mobile platform routines.
  • Record Management: Securely manage health and user records on-device.
  • Advanced ML: Integrated support for Federated Learning and distributed processing via burn and linfa.
  • Privacy-Preserving Tech: Experimental support for Post-Quantum Cryptography (ML-KEM/ML-DSA).

🛠️ Installation

Add this to your Cargo.toml:

[dependencies]
hubro-sdk = { version = "1.0.1", features = ["server"] } # Or "mobile"

🏗️ Development & Build

Target

The SDK primarily targets WebAssembly (WASI).

Standard Build (WASIp1)

# Clean release build
cargo build --target wasm32-wasip1 --release

WASIp2 Build (Mobile/Advanced)

cargo build --release --target wasm32-wasip2 --features mobile

⚡ Optimization

To minimize binary size for production, we recommend using wasm-opt:

wasm-opt --all-features -Oz -o optimized.wasm unoptimized.wasm

🧰 Technology Stack

  • Runtime: WebAssembly (WASI) / Fermyon Spin
  • Data Standard: HL7 FHIR (R4B)
  • Serialization: serde / serde_json / polars
  • Cryptography: jwt-compact, chacha20poly1305, ml-kem, tfhe
  • Machine Learning: burn, linfa, ndarray

📁 Project Structure

  • src/plugin.rs: Core plugin infrastructure and deployment logic.
  • src/fhir.rs: HL7 FHIR standard implementation.
  • src/signals.rs: Platform signal and event handling.
  • src/mobile.rs: Mobile-specific platform routines.
  • src/toolbox.rs: Utility logic (e.g., OTP interception).
  • hubro-sdk-macros: Procedural macros for easier plugin development.
  • wit/: Interface definitions for WebAssembly.

📖 Documentation & Resources


🏗️ Maintainers

Publishing

# Standard crate publish
cargo publish --allow-dirty

# WASIp2 / Warg publish
warg publish release --name hubro-platform:hubro-sdk --version 1.0.1 target/wasm32-wasip2/release/hubro_sdk.wasm

Built with ❤️ by the Hubro Team.