commit | 0fb13522eb32ab6dcee8b1f79b832c1ff8744b8b | [log] [tgz] |
---|---|---|
author | Cole Faust <colefaust@google.com> | Fri Nov 10 14:59:38 2023 -0800 |
committer | Cole Faust <colefaust@google.com> | Fri Nov 10 15:03:37 2023 -0800 |
tree | b93dc16bcb9e649881601e1254728a899ed4a2d1 | |
parent | 71ff99d90a971da511bb526b512cd97101e255fc [diff] |
Use embedded_launcher: true in python tools These scripts generate files, and they include the command used to generate them in the file itself. When using a non-embedded-launcher python binary, the binary is a zip file that extracts itself to a temporary folder before running. The temporary folder is non-deterministic, and that non-deterministic path will end up in the file since they write the sys.argv to the file. embedded_launcher binaries do not extract the zip, and thus don't have any non-deterministic paths. Bug: 307824623 Test: Presubmits Change-Id: Ia1d2ab97d587cf2f7a2d7a524b29ad875985577c
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: