commit | 2f616e0485818d387c421973a77b271441812de7 | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Mon Jul 15 20:51:34 2024 +0000 |
committer | Henri Chataing <[email protected]> | Mon Jul 15 20:51:35 2024 +0000 |
tree | a692e99487865646b4c6f0b4f954f214510e10fe | |
parent | ae290114b002638ec5694cc0df5abf314c0e6681 [diff] |
Upgrade pdl-runtime to 0.3.1 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: I327f135fd0dc6352eeb3b678cb8799104a6901bf
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: