How to call rustfmt in manually generated code?

Viewed 658

So I am generating bindings for a library and on top of that I'm generating most of the safe wrappers for that library.

The way I'm doing is simply generating a String with all the contents and writing to the file with the File trait...

I know the bindings crate supports formatting the generated code, but this particular one is not generated by it. Is there a way to make the build.rs call rustfmt on that generated file?

1 Answers
Related