maker 0.0.2

Generic Rusty declarative build system like GNU Make
Documentation
  • Coverage
  • 81.82%
    9 out of 11 items documented0 out of 10 items with examples
  • Size
  • Source code size: 9.62 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 314.76 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • e792a8/maker
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • e792a8

maker

Generic Rusty declarative build system, like GNU Make.

Allows writing some Makefile-like rules, e.g.

let obj = Target::new_file("main.o")
    .depends_on_file("main.c")
    .recipe(|target, deps| {
        Command::new("gcc")
            .arg("-o")
            .arg(target)
            .args(deps)
            .status()
            .unwrap();
    });
let bin = Target::new_file("main")
    .depends_on_target(obj)
    .recipe(|target, deps| {
        Command::new("ld")
            .arg("-o")
            .arg(target)
            .args(deps)
            .status()
            .unwrap();
    });
bin.make();

... which is equivalent to the Makefile:

main.o: main.c
    gcc -o $@ $^
main: main.0
    ld -o $@ $^

... but see that .recipe() function? We can not only write shell scripts there, but also do more things fun and cross-platform (meanings of generic) -- in Rust!

In the hope that it will be useful in build.rs and xtask.