commit | cd64d51947e674fe822d764c924463eac17df379 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Mon Aug 07 10:43:15 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Mon Aug 07 10:43:15 2023 +0000 |
tree | 26fb766f433f2511d34f90463afb6f8e8271aeca | |
parent | 86095b75c72c87fa816266f9f6f88ead4deb28ac [diff] | |
parent | 63679968fab712d96902ae57d108dc7d1add990f [diff] |
Snap for 10620181 from 63679968fab712d96902ae57d108dc7d1add990f to mainline-art-release Change-Id: I48ac7007240cde6acb6a8f6336a98f8d2b497734
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: