commit | 7880889369ce638fffe3bbd54723f3c9030f24f6 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Tue May 21 15:03:46 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue May 21 15:03:46 2024 +0000 |
tree | 61b23dbcf4832ffec58313f49fc92b8d9261fd40 | |
parent | 06cfbff95639f0c07d396878cae8a3435b73b556 [diff] | |
parent | a3d6be47abbf7981662783f65ff57702a5aebce7 [diff] |
Update Android.bp by running cargo_embargo am: 2669c2ff6c am: a3d6be47ab Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/3093012 Change-Id: Idc80019d5e14951151f0a56391f28ba4722cd3c7 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: