Have you ever thought "I want to write Rust, but in a Makefile"? No? Well, I have.
So I present to you: makerust
.
hello-world:
@fn main() {
println!("hello makerust!")
}
$ make hello-world
hello makerust!
Need some dependencies?
makerust
handles that.
info: dep.xshell dep.anyhow
@
use anyhow::Result;
use xshell::{cmd, Shell};
fn main() -> Result<()> {
let sh = Shell::new()?;
let branch = "main";
let commit_hash = cmd!(sh, "git rev-parse {branch}").read()?;
println!("makerust running on commit {commit_hash}");
Ok(())
}
$ make info
makerust running on commit 5a9c640331fa11cfff0f3147732b49e8b247f687
include makerust.mk
and then get going.
make is good. Rust is good. In combination it can only get better.
We don't ask this question around here.
Check with your team first, but I can't see a reason why not.
I don't make jokes on the internet.
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
THE SOFTWARE IS PROVIDED "AS IS", BUT ALSO I TAKE FULL RESPONSIBILITY FOR
THIS UNNUTTERABLE HORROR AND YOU SHALL RECITE MY NAME FOR FOREVER ALONGSIDE IT.