commit | 9252ef140b3449bc886758aef0340dfd2acd72f5 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue Jan 23 02:17:23 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue Jan 23 02:17:23 2024 +0000 |
tree | 7f329964d84aec6acacc4881c092e424d49a49a2 | |
parent | 51985abcd19d9b18a4364c4f42fd9af4379759fb [diff] | |
parent | d64dbb98d73fd0b5c7887dfd48fca1942902e894 [diff] |
Snap for 11342487 from d64dbb98d73fd0b5c7887dfd48fca1942902e894 to emu-34-release Change-Id: I35db81a3ac51fab155ac55b8576269fe9646db12
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: