Make Ultra

Make Ultra is a task runner useful for running certain commands when your files change.

Check out the following rule file (written in TOML):

```toml

saved as makeultra.toml

folders = ["Foo", "Bar"]

[[rule]]

rules use rusty regex: https://docs.rs/regex/*/regex/#syntax

from = '(?P.*).js$' to = '$name.min.js' exclude = '.min.js$'

For all commands: $i = input file; $o = output file

command = 'terser $i -o $o'

[[rule]] from = '(?P.*).min.js$' to = '$name.min.js.gz' command = 'zopfli $i'

[[rule]] from = '(?P.*).min.js$' to = '$name.min.js.br' command = 'brotli -f $i'

Optimize png files in-place, only re-running when you modify them:

[[rule]] from = '(?P.*.png)$' to = '$name' command = 'optipng -clobber -fix -quiet -strip all $i' ```

Why Another?

I needed something faster than Grunt and Gulp that had a simpler syntax than Make and tracking of files modified in-place. Make Ultra accomplishes these goals.

Features:

  1. It doesn't require you to explicitly state dependencies.
  2. It can track whether files that are modified in-place need to be rebuilt.
  3. File hashes are generated with hashbrown's hasher (and hashbrown is used for all HashMaps interally), serialized with bincode, and cached within .make_cache, allowing us to keep track of whether or not to rebuild files and their dependents without relying on filesystem metadata.
  4. Rule files are written in TOML and use Rust's regex syntax to match and replace file patterns.
  5. It's cross-platform.
  6. It's very fast.
  7. You can generate a DOT file with the --dot option and view the build tree.

Still a Long Way to Go

More is in the works for this project to be worthy of its name, but I don't know if anything can ever beat Make. This also serves as a project for me to learn Rust while accomplishing something that hasn't been done yet in the language (cargo-make isn't language-agnostic and just doesn't have support for wildcards).

This project is not ready for a lot of use cases (e.g. multiple dependencies for a single input file, so you can't link together your .o files yet). Right now, it actually works great if you are simply running tasks on individual files, but it lacks support for the things that are necessary for more elaborate workloads that will allow you to build larger projects.


Other Similar, Language-Agnostic Tools