commit | 0bbf5b6a5873e9dd2524506486fa90ddfe0e25f0 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri Nov 17 00:12:58 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Fri Nov 17 00:12:58 2023 +0000 |
tree | d261c5021cf1151e37b78b4c190a16037bd0575e | |
parent | 4faa8dc3b9522b068615f203824d0b56a5e64129 [diff] | |
parent | e5f3986d1e740294e1dcc174b54d50e2a1fe841f [diff] |
Snap for 11111096 from e5f3986d1e740294e1dcc174b54d50e2a1fe841f to 24Q1-release Change-Id: If4a75b26014e6936e453ce9bdcb3e2eb629081ca
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: