commit | 874276252f6e67d9baf94039bddacc7b6b422855 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu Oct 17 01:12:54 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu Oct 17 01:12:54 2024 +0000 |
tree | b70029532c7bdeb185bf8359f29b669a7d2835b8 | |
parent | e2d143c610fec94f4039c0bd8a818552c3989754 [diff] | |
parent | 9b20adba948939bd8f37392da14b1b8f25efc380 [diff] |
Snap for 12510629 from 9b20adba948939bd8f37392da14b1b8f25efc380 to sdk-release Change-Id: I878e3b9b2cfc3d0d989ea9002f4ebd082a6287f9
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: