I wish you had notified me about this!
One of the primary to-dos was always to convert my script into rust/get it supported under cargo! The main hold-up was that I had had issues working with string manipulations in Rust for puzzles, so I was hesitant.
Also, CG has finally started to tackle the issue of release mode compilation, and is now compiling rust in release mode on submission! So the optimisations are no longer neccessary.
Pretty printing and/or minification may still be on the table. But that’s a much simpler task in any case.
When I’m done with my assessments (in a few days) I’ll take a look at this and see if there are any features in my script that I could port onto yours, likely via fork+PR. (E.g. local (personal) crate support/addressing your issue).
Also is there any particular reason you implemented this for writing a dedicated build.rs instead of specifying the input and output paths purely by configuration in cargo.toml? (I don’t know for sure, but my understanding is that there is a way to specify the paths as configurations of your crate within the toml)