tosca-controller

Crates.iotosca-controller
lib.rstosca-controller
version0.1.1
created_at2026-01-03 23:16:48.158125+00
updated_at2026-01-04 23:01:13.275715+00
descriptionA library for building a controller that manages all Tosca devices across a network.
homepage
repositoryhttps://github.com/ToscaLabs/tosca/tree/master/crates/tosca-controller
max_upload_size
id2020918
size139,648
(Luni-4)

documentation

https://docs.rs/tosca-controller

README

tosca-controller

Crates.io Version LICENSE

The tosca-controller library crate offers a set of APIs to manage, orchestrate, and interact with all tosca-compliant devices within a network.

A device is compliant with the tosca architecture if its firmware is built using the tosca APIs designed for the relative microcontroller.

The core functionalities of this crate include:

  • Discovering all devices within the network that are compliant with the tosca architecture
  • Constructing and sending REST requests to tosca devices to trigger one or more of their operations
  • Defining security and privacy policies to allow or block requests
  • Intercepting device events by subscribing to the brokers where they are published

To optimize system resource usage, tosca-controller leverages tokio as an asynchronous executor. This improves performance by allowing concurrent execution of independent tasks. If the underlying machine is multi-threaded, the performance boost is further amplified, as tasks are distributed across multiple threads too.

Build Process

To compile this crate with the debug profile, run:

cargo build

To compile this crate with the release profile, which applies all optimizations for faster performance and reduced memory usage, run:

cargo build --release

Build Examples

The examples directory includes some examples to interact with the tosca devices within a network. Each example is independent from another and can be moved to a separate repository.

To build an example:

cd examples/[example directory name]
cargo build [--release]
Commit count: 0

cargo fmt