commit | b32d1823b491678db6f89438450945e8c973b5e2 | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Sat Aug 12 00:08:10 2023 +0000 |
committer | Henri Chataing <[email protected]> | Sat Aug 12 00:08:10 2023 +0000 |
tree | 897836674c74faac90707276de61c91a3c2e8c6b | |
parent | 6e418cc0c7efdd32cb92b38b3bbcae061436be75 [diff] |
Upgrade pdl-compiler to 0.1.6 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update rust/crates/pdl-compiler For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md Test: TreeHugger Change-Id: I96ddca3eebd1c7ca647fa750f6329c83d05ab9ed
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: