[PATCH v2 16/18] build: new crate, misc
From: Ezekiel Newren <ezekielnewren@gmail.com>
Signed-off-by: Ezekiel Newren <ezekielnewren@gmail.com>
---
Makefile | 2 +-
meson.build | 2 +-
rust/Cargo.toml | 1 +
rust/misc/Cargo.toml | 14 ++++++++++++++
rust/misc/src/lib.rs | 0
5 files changed, 17 insertions(+), 2 deletions(-)
create mode 100644 rust/misc/Cargo.toml
create mode 100644 rust/misc/src/lib.rs
diff --git a/Makefile b/Makefile
index ef55a8183c..c363a6365d 100644
--- a/Makefile
+++ b/Makefile
@@ -929,7 +929,7 @@ EXTLIBS =
GIT_BUILD_DIR := $(CURDIR)
export GIT_BUILD_DIR
-RUST_CRATES :=
+RUST_CRATES := misc
.PHONY: compile_rust rustclean
WITH_RUST ?= true
diff --git a/meson.build b/meson.build
index cbe1afac83..6911625f3b 100644
--- a/meson.build
+++ b/meson.build
@@ -267,7 +267,7 @@ version_gen_environment.set('GIT_DATE', get_option('build_date'))
version_gen_environment.set('GIT_USER_AGENT', get_option('user_agent'))
version_gen_environment.set('GIT_VERSION', get_option('version'))
-rust_crates = []
+rust_crates = ['misc']
rust_builds = []
with_rust = get_option('with_rust')
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
index aaf008b5ee..010effef4c 100644
--- a/rust/Cargo.toml
+++ b/rust/Cargo.toml
@@ -1,5 +1,6 @@
[workspace]
members = [
"build-helper",
+ "misc",
]
resolver = "2"
diff --git a/rust/misc/Cargo.toml b/rust/misc/Cargo.toml
new file mode 100644
index 0000000000..7195d7894d
--- /dev/null
+++ b/rust/misc/Cargo.toml
@@ -0,0 +1,14 @@
+[package]
+name = "misc"
+version = "0.1.0"
+edition = "2021"
+
+[lib]
+name = "misc"
+path = "src/lib.rs"
+## staticlib to generate xdiff.a for use by gcc
+## cdylib (optional) to generate xdiff.so for use by gcc
+## rlib is required by the rust unit tests
+crate-type = ["staticlib", "rlib"]
+
+[dependencies]
diff --git a/rust/misc/src/lib.rs b/rust/misc/src/lib.rs
new file mode 100644
index 0000000000..e69de29bb2
--
gitgitgadget