commit | 9c933187bc08c8a943a6db66c4670aa956c8c738 | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Tue Nov 14 00:32:22 2023 +0000 |
committer | Henri Chataing <[email protected]> | Tue Nov 14 00:39:42 2023 +0000 |
tree | 40b5fb74851bbe10e4eedcb94a663faf615c15bb | |
parent | 0fb13522eb32ab6dcee8b1f79b832c1ff8744b8b [diff] |
Upgrade pdl-compiler to 0.2.3 Test: TreeHugger Change-Id: I667e80078f6f54cfff5fb7db0d263675da9c02c2
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: