Best practice on compile c++ or rust scripts

Nextflow modules works great for Rscript, python and shell scripts.

I found myself dealing with some Rust and c++ script lately. I wonder what are best practices on compile c++ or rust scripts in nextflow.

i have the following 2 ideas

  • option1: pre compile and store in docker. Cons: have to update docker image when edit the scripts.
  • option2: compile at run time.

since my scripts are very small compile < 1s, i have been doing option 2 compile with conda “gxx_linux-64”

want to get some feedbacks on how others are handling scripts that need to be compiled.

thanks!

Fair question, Shiyi.

The best practice is certainly to use compiled binaries in the docker container. If you’re doing rapid iteration/development, I’d recommend using a “:latest” tag on the ‘container’ directive and then setting up some automation to automatically build and push the container to that tag.

As your programs reach maturity, then start to formalize with a v1.0 tag etc.

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