commit | 3763df02b1772ceaad52804a7add17886520231a | [log] [tgz] |
---|---|---|
author | Ivan Lozano <[email protected]> | Fri Jul 19 14:26:10 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Fri Jul 19 14:26:10 2024 +0000 |
tree | 77f8cca5250ed5628d58411e095ab2079f34ebce | |
parent | 94b1963144022397152f4fcb67a01c22c1f8da17 [diff] | |
parent | 6b41354b60d62ce3694adb36f4d9ed4462821d35 [diff] |
Merge "Update module with host_cross_supported" into main am: 1136cdb7dd am: 6b41354b60 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/3181059 Change-Id: Id789c8113c4544058c487f97427218e6bf34e92b 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: