commit | 69cfcd0b6f5b63650536c1ebf4aa2f977279432f | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Sat May 11 01:13:40 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Sat May 11 01:13:40 2024 +0000 |
tree | a663b04ca2888c121ad2f18f93e3128b7ca2e885 | |
parent | fe8259d830ff106945047415548a712325e836ce [diff] | |
parent | 06cfbff95639f0c07d396878cae8a3435b73b556 [diff] |
Snap for 11828632 from 06cfbff95639f0c07d396878cae8a3435b73b556 to 24Q3-release Change-Id: Ic739a8e9308473bad57a44df671240c30aa04ceb
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: