commit | 91093934e83c993117e09401e51df8ea61949ce6 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue Oct 22 23:12:24 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue Oct 22 23:12:24 2024 +0000 |
tree | 32b8ee06e5e20d00c291332965a6392921fc997f | |
parent | 874276252f6e67d9baf94039bddacc7b6b422855 [diff] | |
parent | 6de3c25c3a5b06b73d2d558394a91f0540b00c8d [diff] |
Snap for 12538692 from 6de3c25c3a5b06b73d2d558394a91f0540b00c8d to sdk-release Change-Id: I261011425db368e1042b3abb2e5c8cf4da405cba
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: