| Crates.io | ws2812-rs |
| lib.rs | ws2812-rs |
| version | 0.1.0 |
| created_at | 2025-07-07 13:44:22.305108+00 |
| updated_at | 2025-07-07 13:44:22.305108+00 |
| description | Flexible #![no_std] Rust driver for WS2812B LEDs — supports delay traits, spinloops, manual timing, and custom color patterns. |
| homepage | |
| repository | https://github.com/CosmoBunny/ws2812-rs |
| max_upload_size | |
| id | 1741292 |
| size | 54,888 |
A lightweight, platform-agnostic Rust driver for WS2812B RGB LEDs. Designed with embedded systems in mind, this crate provides configurable timing strategies for controlling LED strips using only a data line. Compatible with #![no_std].
own_delay: Uses an external delay provider implementing DelayNsmanual_delay: Expects delay objects at function callspinloop_delay: Pure spin-loop timing using CPU frequencyColor structEnable your desired timing backend by activating one of the following features:
| Feature | Description |
|---|---|
own_delay |
Use a mutable reference to a DelayNs trait impl |
manual_delay |
Provide delay at each call to send_color |
spinloop_delay(default) |
Delay through CPU spin-loops with known frequency |
Note: Only one feature should be enabled at a time.
Cargo.toml[dependencies]
ws2812b = "*"
embedded-hal = "1.*" # or compatible version