commit | 78d9c2e46b8af889aa08f521a14c7259b01e1fa4 | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <[email protected]> | Mon Feb 05 09:57:36 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Mon Feb 05 09:57:36 2024 +0000 |
tree | f91c5674b32b7c7960b0bccab434426de019774b | |
parent | d7cdc35b9f773b7595b997f5d07d455aedc65ae0 [diff] | |
parent | 8ced8b9d88e6817bcceed48e114a3eb9655bda26 [diff] |
Upgrade pdl-runtime to 0.2.3 am: b91ba5464b am: 8ced8b9d88 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-runtime/+/2949825 Change-Id: I5c2bd01ffe3cb153e1d3fafad88b233551abbc1e Signed-off-by: Automerger Merge Worker <[email protected]>
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: