commit | 5a685899cde87c8b2796e2cb4cff128b01c1e106 | [log] [tgz] |
---|---|---|
author | Henri Chataing <[email protected]> | Fri Jun 30 15:31:40 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Fri Jun 30 15:31:40 2023 +0000 |
tree | e00e76908c9390c398f7ffc6ca31cf93b9aaa8ea | |
parent | f559097558816962eacb852e7ecc2b5793fb0697 [diff] | |
parent | d43572c91e7eeb47f80cc60baaef8a1afa9df225 [diff] |
Update pdl-compiler to 0.1.3 am: d43572c91e Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/2645503 Change-Id: I913a85587b1f1e719ff1b86763ad3941321f84cc 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: