commit | fd79d54d54c3d6d51727a32d36eb3cecb8b37802 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue Sep 10 23:11:44 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue Sep 10 23:11:44 2024 +0000 |
tree | 298ce4189e419baffd78abb4be1d766eb16394c8 | |
parent | fe55cd9462e3c30b7bde1ade3145b32546ba2fcd [diff] | |
parent | 9d0d0d3787055d136a085bc8060d350992cf6d02 [diff] |
Snap for 12349386 from 9d0d0d3787055d136a085bc8060d350992cf6d02 to sdk-release Change-Id: I5c196248717538ecea0b09ff845a828d53e77c40
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: