commit | d43572c91e7eeb47f80cc60baaef8a1afa9df225 | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Tue Jun 27 13:56:19 2023 +0000 |
committer | Henri Chataing <[email protected]> | Thu Jun 29 07:26:46 2023 -0700 |
tree | e00e76908c9390c398f7ffc6ca31cf93b9aaa8ea | |
parent | 57dd65382caf1a46525460d9de34952f2a01fcea [diff] |
Update pdl-compiler to 0.1.3 Test: TreeHugger Change-Id: I117a9881f4f11c1ebaef7565f6b48a3d176d25c2
PDL is a domain specific language for writing the definition of binary protocol packets. Parsing and validating packets from raw bytes is tedious and error prone in any language. PDL generates memory safe and tailored backends for multiple target languages:
- Rust - C++ - Python
Historically PDL was developed as part of the Android Bluetooth stack (bluetooth_packetgen) as a way to generate the parser and serializer for Bluetooth packets, and reduce the number of memory safety issues that come with manipulating and validating raw data.
cargo run my-protocol.pdl --output-format rust > my-protocol.rs
Language specific instructions are provided for all supported backends: