Subject: [PATCH 03/13] cargo: convert from a crate to a workspace

From: "Ezekiel Newren via GitGitGadget" <[email-masked]>
Date: Thu, 27 Nov 2025 01:10:25 +0000

From: Ezekiel Newren <[email-masked]>

Signed-off-by: Ezekiel Newren <[email-masked]>
---
 Cargo.toml                          | 15 +++++----------
 rust/gitcore/Cargo.toml             | 10 ++++++++++
 {src => rust/gitcore/src}/lib.rs    |  0
 {src => rust/gitcore/src}/varint.rs |  0
 4 files changed, 15 insertions(+), 10 deletions(-)
 create mode 100644 rust/gitcore/Cargo.toml
 rename {src => rust/gitcore/src}/lib.rs (100%)
 rename {src => rust/gitcore/src}/varint.rs (100%)

diff --git a/Cargo.toml b/Cargo.toml
index 2f51bf5d5f..02273f5142 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,10 +1,5 @@
-[package]
-name = "gitcore"
-version = "0.1.0"
-edition = "2018"
-rust-version = "1.49.0"
-
-[lib]
-crate-type = ["staticlib"]
-
-[dependencies]
+[workspace]
+members = [
+    "rust/gitcore",
+]
+resolver = "2"
diff --git a/rust/gitcore/Cargo.toml b/rust/gitcore/Cargo.toml
new file mode 100644
index 0000000000..2f51bf5d5f
--- /dev/null
+++ b/rust/gitcore/Cargo.toml
@@ -0,0 +1,10 @@
+[package]
+name = "gitcore"
+version = "0.1.0"
+edition = "2018"
+rust-version = "1.49.0"
+
+[lib]
+crate-type = ["staticlib"]
+
+[dependencies]
diff --git a/src/lib.rs b/rust/gitcore/src/lib.rs
similarity index 100%
rename from src/lib.rs
rename to rust/gitcore/src/lib.rs
diff --git a/src/varint.rs b/rust/gitcore/src/varint.rs
similarity index 100%
rename from src/varint.rs
rename to rust/gitcore/src/varint.rs
-- 
gitgitgadget