commit | c531765b77c435b38284299e12332d8ecf628437 | [log] [tgz] |
---|---|---|
author | David Duarte <[email protected]> | Thu May 30 20:32:11 2024 +0000 |
committer | David Duarte <[email protected]> | Fri May 31 21:22:00 2024 +0000 |
tree | d145f28db5dc409fe83ff9617b8d9740f6bf62be | |
parent | 2669c2ff6c0d6410942b54982b5492ceb9c4f0f6 [diff] |
Update cargo2android_toplevel.bp for next major pdl update Test: None Change-Id: I4d33c3963b8da0b8811d704ea67e63bedfeeaaeb
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: