Simple batch migration tool for crates (to 2018 edition)?

In JavaScript I've used recast and jscodeshift to automate trivial changes across multiple files.

Does anyone know of similar tools for Rust programs?

I'd like to use something like that to automate migrating tasks in rust-rosetta to the 2018 edition. Specifically removing extern some-crate statements and adjusting the Cargo.toml. I know I could cobble together some pipelines or write a throwaway tool but wanted to ask around first.

The cargo fix command can do some of this. Details in the edition guide.

1 Like

Thank you! Next time I shall read all of the edition guide before gallivanting through repositories. :smile:

Unfortunately cargo fix does not yet migrate extern some-crate statements:

One small note here: cargo fix will not currently automate this change. We may have it do this for you in the future.

A cobbling I will go!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.