File tree Expand file tree Collapse file tree 4 files changed +39
-0
lines changed Expand file tree Collapse file tree 4 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 2222
2323## Tools
2424
25+ - [ Coccinelle for Rust] ( Coccinelle-for-Rust.md )
26+
2527## Users
2628
2729 - [ NVMe Driver] ( NVMe-driver.md )
Original file line number Diff line number Diff line change 1+ # Coccinelle for Rust
2+
3+ Coccinelle is a tool for automatic program matching and transformation that
4+ was originally developed for making large scale changes to the Linux kernel
5+ source code (ie, C code). Matches and transformations are driven by
6+ user-specific transformation rules having the form of abstracted patches,
7+ referred to as semantic patches. As the Linux kernel, and systems software
8+ more generally, is starting to adopt Rust, we are developing Coccinelle for
9+ Rust, to make the power of Coccinelle available to Rust codebases.
10+
11+ ## Examples
12+
13+ Changing a method call sequence in the Rust implementation:
14+
15+ ![ Changing a method call sequence in the Rust implementation] ( Coccinelle-for-Rust/tcx.png )
16+
17+ Merging some lifetimes in tokio:
18+
19+ ![ Merging some lifetimes in tokio] ( Coccinelle-for-Rust/tokio.png )
20+
21+ ## Current status
22+
23+ Coccinelle for Rust is currently a prototype. It relies on Rust Analyzer
24+ for parsing and rustfmt for pretty printing. It mainly supports matching
25+ and transformation of expressions and types, but reasoning about control
26+ flow is not yet supported.
27+
28+ ## Availability
29+
30+ [ Coccinelle for Rust] ( https://gitlab.inria.fr/coccinelle/coccinelleforrust.git )
31+
32+ [ A recent talk about Coccinelle for Rust] ( https://gitlab.inria.fr/coccinelle/coccinelleforrust/-/blob/main/talks/rfl.pdf )
33+
34+ ## Contact
35+
36+ - Julia Lawall: [ Julia.Lawall@inria.fr ] ( mailto:Julia.Lawall@inria.fr )
37+ - Tathagata Roy: [ tathagata.roy1278@gmail.com ] ( mailto:tathagata.roy1278@gmail.com )
You can’t perform that action at this time.
0 commit comments