What is `build.jl` for?

I’ve seen several mentions of reps/build.jl as part of setting up a Julia project, but it’s unclear to me what it is for. What are use cases or examples for build.jl?

It can be used when you need to configure something for the package specific to the machine where it is installed. It used to be used for installing binary dependencies, but since Julia 1.3 artifacts is used for that. There are lots of problems using it (relocability, reproducibility, …) so I would avoid it. There are better tools for this now (e.g. artifacts, scratch spaces).

See the docs Adding a build step to the package


Yeah it’s those docs that made me wonder: they don’t say much.