How to improve my Rust workflow?

58 points DJDuque

I will briefly describe what I do 99% of the time with Rust:

  1. I create a binary crate in Rust (generate_data.exe); the executable: reads data from an external file, manipulates it, generates a txt file with data to make some plots.
  2. I write a template in LaTeX (generate_plots.tex) to generate the plots with pgfplots and tikz.
  3. I write a bash script (my_program.exe) that: runs generate_data.exe, compile generate_plots.tex

Things I don't like:

  1. I don't know how to organize the templates and bash scripts. Where should they go? Its easy to organize and deal with the Rust stuff, but where should the rest go? If I add C++ stuff, should cmake run cargo build? Where can I read about organizing projects not 100% Rust?
  2. My program is actually divided into 2 programs: bash script and rust script. It feels ugly because my bash script is asking for flags that it needs (keep/remove files) plus flags just to send to the rust script.
  3. I need some sort of config.sh that defines environment variables with the path to the latex templates. Is this reasonable?

I want to keep using txt files and LaTeX templates because this makes it easier to re-use plots in publications, beamer presentations, and other tex files.

Does anybody have some suggestions for me?