commit | 51fb870dfb025dbfe0d98efd2b41ed9ba4c8898f | [log] [tgz] |
---|---|---|
author | David Duarte <[email protected]> | Tue Jun 04 00:42:15 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue Jun 04 00:42:15 2024 +0000 |
tree | d145f28db5dc409fe83ff9617b8d9740f6bf62be | |
parent | 7880889369ce638fffe3bbd54723f3c9030f24f6 [diff] | |
parent | 9a500b7fc1e4df8e962442755ad4724d91dba7b7 [diff] |
Update cargo2android_toplevel.bp for next major pdl update am: c531765b77 am: 9a500b7fc1 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pdl-compiler/+/3108745 Change-Id: I416e49ae0b01277393ee3e67022b37ce4a06caa0 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: