commit | 33ae42fcb34a40d347c7337c08bd0b909b7ed48b | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu Aug 31 17:30:02 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu Aug 31 17:30:02 2023 +0000 |
tree | 897836674c74faac90707276de61c91a3c2e8c6b | |
parent | 2227d5f4100c95d4656a93897aa4f3255f1b6ca5 [diff] | |
parent | c926f5b2ffcdda548241ea633c8d6b77975de1df [diff] |
Snap for 10743636 from c926f5b2ffcdda548241ea633c8d6b77975de1df to mainline-uwb-release Change-Id: I8509f5775852ff7a719a86d1ab5cb8598d092bba
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: