commit | 2c33e22aa25c4768e7b91e82954e6b3c700ab2d4 | [log] [tgz] |
---|---|---|
author | Andrew Walbran <qwandor@google.com> | Tue Nov 14 18:15:28 2023 +0000 |
committer | Andrew Walbran <qwandor@google.com> | Tue Nov 14 18:15:28 2023 +0000 |
tree | 9e78446ccc3c344a285e345dee74ea2b24765054 | |
parent | 0fb13522eb32ab6dcee8b1f79b832c1ff8744b8b [diff] |
Add //tools/netsim:__subpackages__ to extra bp file. This was added to Android.bp in https://r.android.com/2820189 without adding it here, so it would be removed by re-running cargo2andriod.py. Bug: 305723170 Test: Ran cargo2android.py Change-Id: I5e368d4cd7720ea538ba9b5a8cafb72a36d69904
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: