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