From a056a5eb9bf32a19fc14dc2113a44d7089d16e1d Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Wed, 11 Sep 2024 16:39:46 +0800 Subject: [PATCH 1/2] build: add Makefile for Rust noobs With this minimal wrappers, one could just download&install Rust and after that just type 'make', no need to be knowledgeable about how to build things in Rust ecosystem. --- Makefile | 2 ++ make.bat | 1 + 2 files changed, 3 insertions(+) create mode 100644 Makefile create mode 100644 make.bat diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..ab8a74a0c --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +all: + cargo build diff --git a/make.bat b/make.bat new file mode 100644 index 000000000..8ebfb624e --- /dev/null +++ b/make.bat @@ -0,0 +1 @@ +cargo build From 24d7c44e3abb19902561d44c317e1220b5a796e3 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Wed, 11 Sep 2024 17:41:10 +0800 Subject: [PATCH 2/2] Makefile: added a configure target This way a user gets hinted about what to install (and what version), and an example way to install it. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ab8a74a0c..7483afe92 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,5 @@ -all: +configure: + @which cargo > /dev/null || (echo "Please install Rust 1.70 (or newer) toolchain; e.g. with 'apt install cargo', or using rustup" && exit 1) + +all: configure cargo build