commit | 72b395d57032cef1f4e9a8deee6a6c98d42331e1 | [log] [tgz] |
---|---|---|
author | Ivan Lozano <[email protected]> | Wed Jul 17 19:18:05 2024 +0000 |
committer | Ivan Lozano <[email protected]> | Wed Jul 17 19:18:05 2024 +0000 |
tree | 307bb74a61071fad3abf113d20eca4ec792044d3 | |
parent | bf618f8ed0f040e6917af22441eedfa877874361 [diff] |
Update module with host_cross_supported Bug: 353739440 Test: m rust Change-Id: I163d39374808a46c22396b713bfc7cc34abe12e1
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: