microSCPI
A lightweight, zero-allocation async SCPI command interpreter for Rust, optimized for embedded systems.
📋 Overview
microSCPI provides a simple yet powerful interface for creating an asynchronous SCPI (Standard Commands for Programmable Instruments) command interpreter. It's specifically designed for embedded devices where resource constraints are a primary concern. The library enables developers to easily implement SCPI communication protocols with minimal overhead.
✨ Key Features
- Zero Heap Allocations: Operates without dynamic memory allocation, perfect for memory-constrained embedded systems
- Compile-Time Command Tree: Efficient command processing with command definitions resolved at compile time
- Async Command Handling: Full support for asynchronous command handlers, enabling non-blocking operations
- Type-Safe Responses: Return values are automatically formatted according to their type
- Minimal Dependencies: Keeps your project's dependency tree lean and build times fast
- Robust Error Handling: Comprehensive error reporting and recovery mechanisms
🚀 Getting Started
Installation
Add microSCPI to your project by including it in your Cargo.toml:
[]
= "0.6.0"
If you need async functionality, make sure to include an async runtime like tokio:
[]
= { = "1", = ["full"] }
Basic Example
Here's a minimal example demonstrating how to use microSCPI to create an SCPI command interface:
use Interface;
pub async
📖 Documentation
For comprehensive documentation, visit docs.rs/microscpi.
🔧 Project Structure
microSCPI is organized as a workspace with the following components:
microscpi: The core library implementationmicroscpi-macros: Procedural macros for the#[microscpi::interface]and#[scpi]attributes
👥 Contributing
Contributions are welcome! Feel free to submit issues or pull requests on the GitHub repository.
📄 License
This project is licensed under the MIT License.