commit | cc29ed222d078acd96fcc60154e57f1a390bb403 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Wed Jul 24 17:53:11 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Wed Jul 24 17:53:11 2024 +0000 |
tree | 77f8cca5250ed5628d58411e095ab2079f34ebce | |
parent | 3cb3ab5bb8892426c54e0f7e321d27edb467e8a1 [diff] | |
parent | 1136cdb7dd9b4e35a13ae988663ce487ae7884b6 [diff] |
Snap for 12134224 from 1136cdb7dd9b4e35a13ae988663ce487ae7884b6 to simpleperf-release Change-Id: I0d238af195f8ca4a745b4f855cc9fe62eebd3969
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: