commit | b91ba5464bf595d5fbc8d051e59ee57ae5bc695c | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <[email protected]> | Mon Feb 05 07:54:27 2024 +0100 |
committer | Jeff Vander Stoep <[email protected]> | Mon Feb 05 07:54:27 2024 +0100 |
tree | f91c5674b32b7c7960b0bccab434426de019774b | |
parent | e1405e9915629423871c489c6b833c9790200bdf [diff] |
Upgrade pdl-runtime to 0.2.3 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update external/rust/crates/pdl-runtime For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md Test: TreeHugger Change-Id: I3386fdbdb9b53a5c9a318cb3c0ee0a898c334240
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: