-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]>
- Loading branch information
1 parent
88605ef
commit c8cd08e
Showing
4 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,8 @@ | |
|
||
## Tools | ||
|
||
- [Coccinelle for Rust](Coccinelle-for-Rust.md) | ||
|
||
## Users | ||
|
||
- [NVMe Driver](NVMe-driver.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Coccinelle for Rust | ||
|
||
Coccinelle is a tool for automatic program matching and transformation that | ||
was originally developed for making large scale changes to the Linux kernel | ||
source code (ie, C code). Matches and transformations are driven by | ||
user-specific transformation rules having the form of abstracted patches, | ||
referred to as semantic patches. As the Linux kernel, and systems software | ||
more generally, is starting to adopt Rust, we are developing Coccinelle for | ||
Rust, to make the power of Coccinelle available to Rust codebases. | ||
|
||
## Examples | ||
|
||
Changing a method call sequence in the Rust implementation: | ||
|
||
![Changing a method call sequence in the Rust implementation](Coccinelle-for-Rust/tcx.png) | ||
|
||
Merging some lifetimes in tokio: | ||
|
||
![Merging some lifetimes in tokio](Coccinelle-for-Rust/tokio.png) | ||
|
||
## Current status | ||
|
||
Coccinelle for Rust is currently a prototype. It relies on Rust Analyzer | ||
for parsing and rustfmt for pretty printing. It mainly supports matching | ||
and transformation of expressions and types, but reasoning about control | ||
flow is not yet supported. | ||
|
||
## Availability | ||
|
||
[Coccinelle for Rust](https://gitlab.inria.fr/coccinelle/coccinelleforrust.git) | ||
|
||
[A recent talk about Coccinelle for Rust](https://gitlab.inria.fr/coccinelle/coccinelleforrust/-/blob/main/talks/rfl.pdf) | ||
|
||
## Contact | ||
|
||
- Julia Lawall: [[email protected]](mailto:[email protected]) | ||
- Tathagata Roy: [[email protected]](mailto:[email protected]) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.