From e3013ac40b0e9dd9b29338b4072e963c911dd69d Mon Sep 17 00:00:00 2001
From: 4lDO2 <4lDO2@protonmail.com>
Date: Thu, 14 Dec 2023 15:32:54 +0100
Subject: [PATCH] Add checks and install cbindgen in bootstrap.sh.

---
 bootstrap.sh  | 3 ++-
 mk/depends.mk | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/bootstrap.sh b/bootstrap.sh
index 9290e2b2b..f116b7782 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -1024,9 +1024,10 @@ fi
 
 cargoInstall cargo-config 0.1.1
 cargoInstall just 1.16.0
+cargoInstall cbindgen 0.26.0
 
 if [ "$dependenciesonly" = false ]; then
 	boot
 fi
 
-echo "Redox bootstrap complete!"
\ No newline at end of file
+echo "Redox bootstrap complete!"
diff --git a/mk/depends.mk b/mk/depends.mk
index a8b549281..0be4c77ba 100644
--- a/mk/depends.mk
+++ b/mk/depends.mk
@@ -7,6 +7,10 @@ ifeq ($(shell which rustup),)
 $(error rustup not found, install from "https://rustup.rs/")
 endif
 
+ifeq ($(shell which cbindgen),)
+$(error cbindgen not found, install from crates.io or from your package manager)
+endif
+
 ifeq ($(shell which nasm),)
 $(error nasm not found, install from your package manager)
 endif
-- 
GitLab