commit | 6b41354b60d62ce3694adb36f4d9ed4462821d35 | [log] [tgz] |
---|---|---|
author | Ivan Lozano <[email protected]> | Fri Jul 19 13:33:01 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Fri Jul 19 13:33:01 2024 +0000 |
tree | 77f8cca5250ed5628d58411e095ab2079f34ebce | |
parent | c6521346dbec79ebdbbf901d4777caf092e159b2 [diff] | |
parent | 1136cdb7dd9b4e35a13ae988663ce487ae7884b6 [diff] |
Merge "Update module with host_cross_supported" into main am: 1136cdb7dd Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/3181059 Change-Id: I955fbbbec43961dda9dd653c5ee88d5ac942c8a2 Signed-off-by: Automerger Merge Worker <[email protected]>
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: