C2Rust Refactoring Tool
command line usage is as follows:
See for a list of commands,including complete usage and descriptions.Multiple commands can be separated by an argument consisting of a singlesemicolon, as in c2rust refactor cmd1 arg1 \; cmd2 arg2
.(Note the semicolon needs to be escaped to prevent it from being interpreted bythe shell.)
Marks
Some commands require the user to "mark" some AST nodes for it to operate on.For example, the rename_struct
command requires that the user mark thedeclaration of the struct that should be renamed.
The most flexible way of marking nodes is by using theselect
command. See the commanddocumentation and src/select/mod.rs
for details. Note that marks are notpreserved across c2rust refactor
invocations, so you usually want to runselect
followed by the command of interest using the ;
separator mentionedabove.