Coccinelle for Rust progress report (Collabora blog)
Date:
Thu, 26 Jun 2025 15:11:51 +0000
Description:
Over on the Collabora blog, Tathagata Roy has an update on the progress of targeting the Coccinelle tool
for matching and transforming source code to Rust. The Coccinelle for Rust project , which we covered in a 2024
talk by Roy at Kangrejos , is adding
the ability to transform Rust programs and the goal is " to bring
Coccinelle For Rust at par with Coccinelle For C in terms of basic functionalities ". There is still work to be done to get there, but
progress is being made in various areas. Computational Tree Logic (CTL) is
the heart of Coccinelle, which takes semantic patches and generalizes them over Rust files. Prior to using this engine, CfR used an ad-hoc method for matching patterns of code. This engine is the same as the one used for Coccinelle for C, with a few minor changes. Most of the changes were
idiomatic but to the same effect. More information on the engine and its language (CTL-VW) can be found in the POPL Paper . With a standard engine, each step of the matching process can be logged, allowing us to learn and reuse the same design patterns from Coccinelle for C, including critical test cases.
======================================================================
Link to news story:
https://lwn.net/Articles/1027087/
--- Mystic BBS v1.12 A47 (Linux/64)
* Origin: tqwNet UK HUB @ hub.uk.erb.pw (1337:1/100)