Crates.io | wake-rs |
lib.rs | wake-rs |
version | 0.2.5 |
source | src |
created_at | 2022-10-12 02:05:14.585624 |
updated_at | 2024-02-04 01:35:05.506877 |
description | Wake protocol library written in Rust |
homepage | https://github.com/ew1abz/wake-rs |
repository | https://github.com/ew1abz/wake-rs |
max_upload_size | |
id | 685823 |
size | 55,558 |
wake-rs
is a library written in Rust for encoding/decoding Wake protocol.
Wake
is a serial communication protocol highly optimized for microcontrollers. It based on SLIP protocol (https://datatracker.ietf.org/doc/html/rfc1055).
The protocol doesn't support:
Frame structure:
There are many architecture-specific implementations:
in many languages:
Add to your Rust project:
cargo add systemd-wake
Create, encode and decode packet:
use wake_rs::{Decode, Encode};
fn main() {
let wp = wake_rs::Packet {
address: Some(0x12),
command: 3,
data: Some(vec![0x00, 0xeb]),
};
let encoded = wp.encode().unwrap();
let decoded = encoded.decode();
}
Build library:
cargo build --release
Build examples:
cargo build --examples
Protocol description, libraries, and tools: http://www.leoniv.diod.club/articles/wake/wake.html
Code released under the MIT License.