commit | ce54c6fdd7fa7990384b7c2eb03e1b2ff5e0930f | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri Jun 02 01:28:42 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Fri Jun 02 01:28:42 2023 +0000 |
tree | de918cbafbfa71e45fdf16b1d0f349dbb1868a83 | |
parent | c01de065fe29ed387a2f00d3797c97e690af6d76 [diff] | |
parent | db9fffe8304d4c6c59b5695c1394495d8c3290e5 [diff] |
Snap for 10238332 from db9fffe8304d4c6c59b5695c1394495d8c3290e5 to emu-33-release Change-Id: I8afd6e321015210ba770773db4d92954034598db
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: