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