commit | e367af11528aab73df3a42488059f2a8607c9211 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri Aug 04 17:19:28 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Fri Aug 04 17:19:28 2023 +0000 |
tree | 26fb766f433f2511d34f90463afb6f8e8271aeca | |
parent | 3e3878bc1f4d33ed5d19304e227060d4f87a1b48 [diff] | |
parent | 63679968fab712d96902ae57d108dc7d1add990f [diff] |
Snap for 10611567 from 63679968fab712d96902ae57d108dc7d1add990f to mainline-sdkext-release Change-Id: I21476be1d122435e16e216074763bfa76e79bd48
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: