commit | e107b6ca4d4614084ff2a32db5defe2bc5194bcb | [log] [tgz] |
---|---|---|
author | Weilun Du <[email protected]> | Fri Jul 14 14:17:48 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Fri Jul 14 14:17:48 2023 +0000 |
tree | e00e76908c9390c398f7ffc6ca31cf93b9aaa8ea | |
parent | 7207476bff709e84ca9164c5176209b8b612a319 [diff] | |
parent | afcefe6794d7b84ca0fabd35fa05517e77be7015 [diff] |
Revert "Update pdl-compiler to 0.1.4" am: afcefe6794 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/2658075 Change-Id: I71cff850e5b36d0ab73f6cb663e125f960c997a2 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: