git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ezekiel Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Ezekiel Newren <ezekielnewren@gmail.com>,
	Ezekiel Newren <ezekielnewren@gmail.com>
Subject: [PATCH 01/13] make: undo Patrick's changes concerning Rust
Date: Thu, 27 Nov 2025 01:10:23 +0000	[thread overview]
Message-ID: <12ab631072e6076f9dbcd905c62a42795ea9dbfa.1764205835.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2110.git.git.1764205835.gitgitgadget@gmail.com>

From: Ezekiel Newren <ezekielnewren@gmail.com>

Signed-off-by: Ezekiel Newren <ezekielnewren@gmail.com>
---
 Makefile   | 49 -------------------------------------------------
 shared.mak |  1 -
 2 files changed, 50 deletions(-)

diff --git a/Makefile b/Makefile
index 7e0f77e298..28bc00e648 100644
--- a/Makefile
+++ b/Makefile
@@ -483,14 +483,6 @@ include shared.mak
 # Define LIBPCREDIR=/foo/bar if your PCRE header and library files are
 # in /foo/bar/include and /foo/bar/lib directories.
 #
-# == Optional Rust support ==
-#
-# Define WITH_RUST if you want to include features and subsystems written in
-# Rust into Git. For now, Rust is still an optional feature of the build
-# process. With Git 3.0 though, Rust will always be enabled.
-#
-# Building Rust code requires Cargo.
-#
 # == SHA-1 and SHA-256 defines ==
 #
 # === SHA-1 backend ===
@@ -691,7 +683,6 @@ OBJECTS =
 OTHER_PROGRAMS =
 PROGRAM_OBJS =
 PROGRAMS =
-RUST_SOURCES =
 EXCLUDED_PROGRAMS =
 SCRIPT_PERL =
 SCRIPT_PYTHON =
@@ -928,18 +919,6 @@ TEST_SHELL_PATH = $(SHELL_PATH)
 
 LIB_FILE = libgit.a
 
-ifdef DEBUG
-RUST_TARGET_DIR = target/debug
-else
-RUST_TARGET_DIR = target/release
-endif
-
-ifeq ($(uname_S),Windows)
-RUST_LIB = $(RUST_TARGET_DIR)/gitcore.lib
-else
-RUST_LIB = $(RUST_TARGET_DIR)/libgitcore.a
-endif
-
 GITLIBS = common-main.o $(LIB_FILE)
 EXTLIBS =
 
@@ -963,15 +942,6 @@ BASIC_LDFLAGS =
 ARFLAGS = rcs
 PTHREAD_CFLAGS =
 
-# Rust flags
-CARGO_ARGS =
-ifndef V
-CARGO_ARGS += --quiet
-endif
-ifndef DEBUG
-CARGO_ARGS += --release
-endif
-
 # For the 'sparse' target
 SPARSE_FLAGS ?= -std=gnu99 -D__STDC_NO_VLA__
 SP_EXTRA_FLAGS =
@@ -1333,9 +1303,7 @@ LIB_OBJS += urlmatch.o
 LIB_OBJS += usage.o
 LIB_OBJS += userdiff.o
 LIB_OBJS += utf8.o
-ifndef WITH_RUST
 LIB_OBJS += varint.o
-endif
 LIB_OBJS += version.o
 LIB_OBJS += versioncmp.o
 LIB_OBJS += walker.o
@@ -1534,9 +1502,6 @@ CLAR_TEST_OBJS += $(UNIT_TEST_DIR)/unit-test.o
 
 UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/test-lib.o
 
-RUST_SOURCES += src/lib.rs
-RUST_SOURCES += src/varint.rs
-
 GIT-VERSION-FILE: FORCE
 	@OLD=$$(cat $@ 2>/dev/null || :) && \
 	$(call version_gen,"$(shell pwd)",GIT-VERSION-FILE.in,$@) && \
@@ -1566,14 +1531,6 @@ endif
 ALL_CFLAGS = $(DEVELOPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_APPEND)
 ALL_LDFLAGS = $(LDFLAGS) $(LDFLAGS_APPEND)
 
-ifdef WITH_RUST
-BASIC_CFLAGS += -DWITH_RUST
-GITLIBS += $(RUST_LIB)
-ifeq ($(uname_S),Windows)
-EXTLIBS += -luserenv
-endif
-endif
-
 ifdef SANITIZE
 SANITIZERS := $(foreach flag,$(subst $(comma),$(space),$(SANITIZE)),$(flag))
 BASIC_CFLAGS += -fsanitize=$(SANITIZE) -fno-sanitize-recover=$(SANITIZE)
@@ -2963,12 +2920,6 @@ scalar$X: scalar.o GIT-LDFLAGS $(GITLIBS)
 $(LIB_FILE): $(LIB_OBJS)
 	$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
 
-$(RUST_LIB): Cargo.toml $(RUST_SOURCES)
-	$(QUIET_CARGO)cargo build $(CARGO_ARGS)
-
-.PHONY: rust
-rust: $(RUST_LIB)
-
 export DEFAULT_EDITOR DEFAULT_PAGER
 
 Documentation/GIT-EXCLUDED-PROGRAMS: FORCE
diff --git a/shared.mak b/shared.mak
index 0e7492076e..5c7bc94785 100644
--- a/shared.mak
+++ b/shared.mak
@@ -56,7 +56,6 @@ ifndef V
 	QUIET_MKDIR_P_PARENT  = @echo '   ' MKDIR -p $(@D);
 
 ## Used in "Makefile"
-	QUIET_CARGO    = @echo '   ' CARGO $@;
 	QUIET_CC       = @echo '   ' CC $@;
 	QUIET_AR       = @echo '   ' AR $@;
 	QUIET_LINK     = @echo '   ' LINK $@;
-- 
gitgitgadget


  reply	other threads:[~2025-11-27  1:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27  1:10 [PATCH 00/13] RFC: Convert to Cargo workspace Ezekiel Newren via GitGitGadget
2025-11-27  1:10 ` Ezekiel Newren via GitGitGadget [this message]
2025-11-27  1:10 ` [PATCH 02/13] meson: undo Patrick's changes concerning Rust Ezekiel Newren via GitGitGadget
2025-11-27  1:10 ` [PATCH 03/13] cargo: convert from a crate to a workspace Ezekiel Newren via GitGitGadget
2025-11-27  1:10 ` [PATCH 04/13] build: build Rust with Makefile and Meson Ezekiel Newren via GitGitGadget
2025-11-27  1:10 ` [PATCH 05/13] .gitignore: ignore /generated/ Ezekiel Newren via GitGitGadget
2025-11-27  1:10 ` [PATCH 06/13] cargo: create crate generate-headers Ezekiel Newren via GitGitGadget
2025-11-27  1:10 ` [PATCH 07/13] cargo: create crate link-with-c Ezekiel Newren via GitGitGadget
2025-11-27  1:10 ` [PATCH 08/13] rust/gitcore: link with c Ezekiel Newren via GitGitGadget
2025-11-27  1:10 ` [PATCH 09/13] varint.h: unsigned char -> uint8_t Ezekiel Newren via GitGitGadget
2025-11-27  1:10 ` [PATCH 10/13] make: delete files in generated/ Ezekiel Newren via GitGitGadget
2025-11-27  1:10 ` [PATCH 11/13] github-workflows: unify with rust parameters in make and meson Ezekiel Newren via GitGitGadget
2025-11-27  1:10 ` [PATCH 12/13] github workflows: install Rust Ezekiel Newren via GitGitGadget
2025-11-27  1:10 ` [PATCH 13/13] rust/build-rust.sh: update dir_git_root variable instantiation Ezekiel Newren via GitGitGadget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12ab631072e6076f9dbcd905c62a42795ea9dbfa.1764205835.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=ezekielnewren@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).