commit | 5ad493ce1a6d335af300f7a2b6369b0a9de317f4 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <[email protected]> | Thu Oct 05 19:09:03 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Thu Oct 05 19:09:03 2023 +0000 |
tree | 897836674c74faac90707276de61c91a3c2e8c6b | |
parent | d3df7bf87306b9411491c2966b14b8560d4a7033 [diff] | |
parent | 8c91d72947da5b15be2728297100c39bea16aaac [diff] |
Merge "Revert "Revert "Update pdl-compiler to 0.1.4""" into main am: 864dc10f82 am: 8c91d72947 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/2671115 Change-Id: I0c373697f15d550a6e7bfc73370949c6d98f3215 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: