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