commit | 3cb3ab5bb8892426c54e0f7e321d27edb467e8a1 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri Feb 02 23:54:32 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Fri Feb 02 23:54:32 2024 +0000 |
tree | 7f329964d84aec6acacc4881c092e424d49a49a2 | |
parent | 3c3c67aafae0c7117b24c216f4efad061d364c51 [diff] | |
parent | 2ce036f7b43c90877bdf4865120eb5da049c4871 [diff] |
Snap for 11400057 from 2ce036f7b43c90877bdf4865120eb5da049c4871 to simpleperf-release Change-Id: I1ad4095166eb69bb16d0841073ac99a68fe8d2a0
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: