commit | fe5d6f1b23c4bd8aa053eb36e06d33b023541668 | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Thu Oct 19 15:34:32 2023 +0000 |
committer | Henri Chataing <[email protected]> | Tue Oct 31 16:50:21 2023 +0000 |
tree | 93b217f5b12c69e9ffe07cfae2289a9ebaf31379 | |
parent | 42955e2a200acb81007c67251964f3874b6f2d93 [diff] |
Upgrade pdl-compiler to 0.2.2 This project was upgraded with external_updater. Usage: tools/external_updater/updater.sh update 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: I3b41a9e9a0f4e4835a33f88d4bd111501ab9aa71
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: