Expand description
§brainwires-hardware
Hardware I/O for the Brainwires Agent Framework.
Provides a unified hardware abstraction layer covering:
| Module | Feature flag | Description |
|---|---|---|
[audio] | audio | Audio capture/playback, STT, TTS (16 cloud providers + local Whisper) |
[gpio] | gpio | GPIO pin management with safety allow-lists and PWM (Linux) |
[bluetooth] | bluetooth | BLE advertisement scanning and adapter enumeration |
[network] | network | NIC enumeration, IP config, ARP discovery, port scanning |
[camera] | camera | Webcam/camera frame capture (V4L2/AVFoundation/MSMF) |
[usb] | usb | Raw USB device enumeration and bulk/control/interrupt transfers |
[homeauto] | homeauto | Home automation: Zigbee (EZSP+ZNP), Z-Wave, Thread (OTBR), Matter |
§Feature flags
[dependencies]
brainwires-hardware = { version = "0.10", features = ["audio", "gpio", "bluetooth", "network"] }
# or enable everything:
brainwires-hardware = { version = "0.10", features = ["full"] }§Audio
The audio feature enables hardware audio capture/playback via CPAL and
16 cloud STT/TTS provider integrations. Add local-stt for offline Whisper
inference and flac for FLAC codec support.
§GPIO (Linux)
The gpio feature exposes safe GPIO pin access using the Linux character
device API (gpio-cdev) with an explicit allow-list safety policy.
§Bluetooth
The bluetooth feature uses btleplug
for cross-platform BLE scanning (Linux/BlueZ, macOS CoreBluetooth, Windows WinRT).
§Network
The network feature provides interface enumeration, IP configuration
parsing, ARP-based host discovery, and async TCP port scanning.
§Camera
The camera feature enables video frame capture using nokhwa:
V4L2 on Linux, AVFoundation on macOS, Media Foundation on Windows.
§USB
The usb feature provides raw USB device enumeration and transfers via
nusb — a pure-Rust async USB library
with no libusb system dependency.