commit | 5eb0ede93ff50b1a571e619b3545c526ed4f03cb | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue Feb 06 00:18:46 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue Feb 06 00:18:46 2024 +0000 |
tree | f91c5674b32b7c7960b0bccab434426de019774b | |
parent | d7cdc35b9f773b7595b997f5d07d455aedc65ae0 [diff] | |
parent | 78d9c2e46b8af889aa08f521a14c7259b01e1fa4 [diff] |
Snap for 11406759 from 78d9c2e46b8af889aa08f521a14c7259b01e1fa4 to 24Q2-release Change-Id: I7b5d1c396e12519ddbbed15be00a48dc9003cf1d
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: