Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/badboy/makerust
Rust, but in a Makefile.
https://github.com/badboy/makerust
Last synced: about 1 month ago
JSON representation
Rust, but in a Makefile.
- Host: GitHub
- URL: https://github.com/badboy/makerust
- Owner: badboy
- Created: 2023-04-25T08:52:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-25T12:13:45.000Z (over 1 year ago)
- Last Synced: 2024-02-17T14:37:06.178Z (9 months ago)
- Language: Makefile
- Size: 3.91 KB
- Stars: 66
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# makerust
### Rust, but in a Makefile.
Have you ever thought "I want to write Rust, but in a Makefile"?
No?
Well, I have.So I present to you: `makerust`.
```make
hello-world:
@fn main() {
println!("hello makerust!")
}
``````console
$ make hello-world
hello makerust!
```Need some dependencies?
`makerust` handles that.```make
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(())
}
``````console
$ make info
makerust running on commit 5a9c640331fa11cfff0f3147732b49e8b247f687
```## How?
```make
include makerust.mk
```and then get going.
## Why?
make is good. Rust is good. In combination it can only get better.
## But really ... why?
We don't ask this question around here.
## Should I really?
Check with your team first, but I can't see a reason why not.
## This is a joke, right?
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.
```