commit | 0c8bb56067b064fd16cc1292cb3c56431cd79129 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <[email protected]> | Wed Nov 15 09:07:16 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Wed Nov 15 09:07:16 2023 +0000 |
tree | 40b5fb74851bbe10e4eedcb94a663faf615c15bb | |
parent | e821f365b7e6ac43679c408a5beaba15657a5a85 [diff] | |
parent | 29b367bea511d5160aa6b2c369b8c726196a61d5 [diff] |
Merge "Add //tools/netsim:__subpackages__ to extra bp file." into main am: ba061c5195 am: 29b367bea5 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/2828247 Change-Id: I1ad42a4846c6ab707f49d5e0340b718434e77fce 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: