commit | 42ce95e07de0cf20aefdf1c7ea8ac6112dc61234 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri Aug 04 15:39:19 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Fri Aug 04 15:39:19 2023 +0000 |
tree | 26fb766f433f2511d34f90463afb6f8e8271aeca | |
parent | 527ab0dee170ce9dd83476f4978d340bb7548705 [diff] | |
parent | 63679968fab712d96902ae57d108dc7d1add990f [diff] |
Snap for 10609607 from 63679968fab712d96902ae57d108dc7d1add990f to mainline-cellbroadcast-release Change-Id: I15462dd6d61b16121ce4d59f373844ec2bbbef0f
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: