Researcher
Robotics & Autonomous Systems,
Royal Military Academy
Address
Avenue De La Renaissance 30, 1000 Brussels, Belgium
Contact Information
Email: theo.engels@mil.be
Publications
2025
- R. De Greef, A. Discepoli, E. Aguililla Klein, T. Engels, K. Hasselmann, and A. Paolillo, “Towards Macro-Aware C-to-Rust Transpilation (WIP)," in Proceedings of the 26th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems, New York, NY, USA, 2025, p. 57–61.
[BibTeX] [Abstract] [Download PDF] [DOI]
The automatic translation of legacy C code to Rust presents significant challenges, particularly in handling preprocessor macros. C macros introduce metaprogramming constructs that operate at the text level, outside of C’s syntax tree, making their direct translation to Rust non-trivial. Existing transpilers –- source-to-source compilers –- expand macros before translation, sacrificing their abstraction and reducing code maintainability. In this work, we introduce Oxidize, a macro-aware C-to-Rust transpilation framework that preserves macro semantics by translating C macros into Rust-compatible constructs while selectively expanding only those that interfere with Rust’s stricter semantics. We evaluate our techniques on a small-scale study of real-world macros and find that the majority can be safely and idiomatically transpiled without full expansion.
@inproceedings{10.1145/3735452.3735535, author = {De Greef, Robbe and Discepoli, Attilio and Aguililla Klein, Esteban and Engels, Th'{e}o and Hasselmann, Ken and Paolillo, Antonio}, title = {Towards Macro-Aware C-to-Rust Transpilation (WIP)}, year = {2025}, isbn = {9798400719219}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, url = {https://doi.org/10.1145/3735452.3735535}, doi = {10.1145/3735452.3735535}, abstract = {The automatic translation of legacy C code to Rust presents significant challenges, particularly in handling preprocessor macros. C macros introduce metaprogramming constructs that operate at the text level, outside of C's syntax tree, making their direct translation to Rust non-trivial. Existing transpilers --- source-to-source compilers --- expand macros before translation, sacrificing their abstraction and reducing code maintainability. In this work, we introduce Oxidize, a macro-aware C-to-Rust transpilation framework that preserves macro semantics by translating C macros into Rust-compatible constructs while selectively expanding only those that interfere with Rust's stricter semantics. We evaluate our techniques on a small-scale study of real-world macros and find that the majority can be safely and idiomatically transpiled without full expansion.}, booktitle = {Proceedings of the 26th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems}, pages = {57–61}, numpages = {5}, keywords = {Abstract Syntax Tree, C, Embedded, Macros, Metaprogramming, Preprocessor, Rust, Transpilation}, location = {Seoul, Republic of Korea}, unit= {meca-ras}, project= {FORCES} series = {LCTES '25} } - T. Engels, A. Discepoli, R. De Greef, E. Aguililla Klein, F. D’Agostino, R. Gunsett, J. Pisane, K. Hasselmann, and A. Paolillo, “FORCES: An Incremental Transpiler from C/C++ to Rust for Robust and Secure Robotics Systems," in Workshop on Rust for Robotics: Building Robust Foundations for Tomorrow’s Autonomous Systems, IEEE International Conference on Robotics and Automation (ICRA), 2025.
[BibTeX]@inproceedings{engels2025forces, author = {Engels, Th{'e}o and Discepoli, Attilio and De Greef, Robbe and Aguililla Klein, Esteban and D'Agostino, Francesco and Gunsett, Remi and Pisane, Jonathan and Hasselmann, Ken and Paolillo, Antonio}, title = {{FORCES}: An Incremental Transpiler from {C/C++} to {Rust} for Robust and Secure Robotics Systems}, booktitle = {Workshop on Rust for Robotics: Building Robust Foundations for Tomorrow’s Autonomous Systems, IEEE International Conference on Robotics and Automation (ICRA)}, year = {2025}, unit= {meca-ras}, project= {FORCES}, note = {Workshop Paper} }
