commit | 730f5d8db8636e6e2d6def4385422a44e4641005 | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Tue Oct 31 01:50:29 2023 +0000 |
committer | Henri Chataing <[email protected]> | Thu Nov 02 22:11:30 2023 +0000 |
tree | 3cbf5951056b03c37726e60ccae18968ee812e71 | |
parent | ec228219f123896511713aada9fa21e1e91ad635 [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-compiler For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md Test: TreeHugger Change-Id: I4151e72a15bcac21c38b734ac3ba71fde1b3d0b3
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: