| Crates.io | tosca-os |
| lib.rs | tosca-os |
| version | 0.1.1 |
| created_at | 2026-01-03 23:07:11.957772+00 |
| updated_at | 2026-01-04 23:01:11.085794+00 |
| description | A library for building Tosca firmware that runs on operating systems. |
| homepage | |
| repository | https://github.com/ToscaLabs/tosca/tree/master/crates/tosca-os |
| max_upload_size | |
| id | 2020907 |
| size | 100,050 |
tosca-os is a library crate for building firmware for tosca devices
running on operating systems.
This crate targets devices that require more resources than typical embedded systems, such as computing time, memory capacity, and interaction with external components.
Currently, only firmware for x86_64 and ARM architectures is supported
and covered by automated tests.
To build the crate with the debug profile, run:
cargo build
To build with the release profile, which enables all time
and memory optimizations, run:
cargo build --release
To run the complete test suite:
cargo test
The stream feature enables all data and methods necessary to
identify a multimedia stream sent from a device to a controller.
To disable all features, add the --no-default-features option to any of the
commands above.
The examples
directory contains firmware implemented using the tosca-os crate.
Each firmware is independent and can be moved to a separate repository by
simply replacing the path of git dependencies with those from crates.io.
If a firmware cannot have system dependencies because it is a standalone
software, a statically-linked binary is required. To achieve this using the
musl toolchain, run the following command:
cargo build --manifest-path examples/firmware_device/Cargo.toml [--release] --target=x86_64-unknown-linux-musl
where firmware_device is the name of the example to build, and --release
is an optional argument that enables all time and memory optimizations.
aarch64 (ARM64) architectureInstall the cross binary to easily
cross-compile Rust projects using Docker, without the need for custom
Dockerfiles.
cargo install -f cross
To build a binary for an ARM64 architecture, run:
cd examples/firmware_device
cross build [--release] --target=aarch64-unknown-linux-musl
where firmware_device is the name of the example to build, and --release
is an optional argument that enables all time and memory optimizations.