git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 02/15] xdiff: introduce rust

From
Ezekiel Newren via GitGitGadget <gitgitgadget@gmail.com>
Date
Aug 23, 2025, 03:55 UTC
Message-ID
<03939951256baaaec3fcc690cfa38ee12fb553ce.1755921357.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1980.v3.git.git.1755921356.gitgitgadget@gmail.com>
From: Ezekiel Newren <ezekielnewren@gmail.com>

Upcoming patches will simplify xdiff, while also porting parts of it to Rust. In preparation, add some stubs and setup the Rust build. For now, it is easier to let cargo build rust and have make or meson merely link against the static library that cargo builds. In line with ongoing libification efforts, use multiple crates to allow more modularity on the Rust side. xdiff is the crate that this series will focus on, but we also introduce the interop crate for future patch series.

In order to facilitate interoperability between C and Rust, introduce C definitions for Rust primitive types in git-compat-util.h.

Signed-off-by: Ezekiel Newren <ezekielnewren@gmail.com>
---
 .gitignore              |  3 +++
 Makefile                | 53 ++++++++++++++++++++++++++++----------
 build_rust.sh           | 57 +++++++++++++++++++++++++++++++++++++++++
 git-compat-util.h       | 17 ++++++++++++
 meson.build             | 52 +++++++++++++++++++++++++++++++------
 rust/Cargo.toml         |  6 +++++
 rust/interop/Cargo.toml | 14 ++++++++++
 rust/interop/src/lib.rs |  0
 rust/xdiff/Cargo.toml   | 15 +++++++++++
 rust/xdiff/src/lib.rs   |  0
 10 files changed, 196 insertions(+), 21 deletions(-)
 create mode 100755 build_rust.sh
 create mode 100644 rust/Cargo.toml
 create mode 100644 rust/interop/Cargo.toml
 create mode 100644 rust/interop/src/lib.rs
 create mode 100644 rust/xdiff/Cargo.toml
 create mode 100644 rust/xdiff/src/lib.rs
diff --git a/.gitignore b/.gitignore
index 04c444404e4b..ff81e3580c4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -254,3 +254,6 @@ Release/
 /contrib/buildsystems/out
 /contrib/libgit-rs/target
 /contrib/libgit-sys/target
+/.idea/
+/rust/target/
+/rust/Cargo.lock
diff --git a/Makefile b/Makefile
index 70d1543b6b86..1ec0c1ee6603 100644
--- a/Makefile
+++ b/Makefile
@@ -919,6 +919,29 @@ TEST_SHELL_PATH = $(SHELL_PATH)
 
 LIB_FILE = libgit.a
 XDIFF_LIB = xdiff/lib.a
+
+EXTLIBS =
+
+ifeq ($(DEBUG), 1)
+  RUST_BUILD_MODE = debug
+else
+  RUST_BUILD_MODE = release
+endif
+
+RUST_TARGET_DIR = rust/target/$(RUST_BUILD_MODE)
+RUST_FLAGS_FOR_C = -L$(RUST_TARGET_DIR)
+
+.PHONY: compile_rust
+compile_rust:
+	./build_rust.sh . $(RUST_BUILD_MODE) xdiff
+
+EXTLIBS += ./$(RUST_TARGET_DIR)/libxdiff.a
+
+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),Linux)
+  EXTLIBS += -ldl
+endif
+
 REFTABLE_LIB = reftable/libreftable.a
 
 GENERATED_H += command-list.h
@@ -1390,7 +1413,7 @@ UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/lib-reftable.o
 
 # xdiff and reftable libs may in turn depend on what is in libgit.a
 GITLIBS = common-main.o $(LIB_FILE) $(XDIFF_LIB) $(REFTABLE_LIB) $(LIB_FILE)
-EXTLIBS =
+
 
 GIT_USER_AGENT = git/$(GIT_VERSION)
 
@@ -2541,7 +2564,7 @@ git.sp git.s git.o: EXTRA_CPPFLAGS = \
 	'-DGIT_MAN_PATH="$(mandir_relative_SQ)"' \
 	'-DGIT_INFO_PATH="$(infodir_relative_SQ)"'
 
-git$X: git.o GIT-LDFLAGS $(BUILTIN_OBJS) $(GITLIBS)
+git$X: git.o GIT-LDFLAGS $(BUILTIN_OBJS) $(GITLIBS) compile_rust
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
 		$(filter %.o,$^) $(LIBS)
 
@@ -2891,17 +2914,17 @@ headless-git.o: compat/win32/headless.c GIT-CFLAGS
 headless-git$X: headless-git.o git.res GIT-LDFLAGS
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -mwindows -o $@ $< git.res
 
-git-%$X: %.o GIT-LDFLAGS $(GITLIBS)
+git-%$X: %.o GIT-LDFLAGS $(GITLIBS) compile_rust
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
 
-git-imap-send$X: imap-send.o $(IMAP_SEND_BUILDDEPS) GIT-LDFLAGS $(GITLIBS)
+git-imap-send$X: imap-send.o $(IMAP_SEND_BUILDDEPS) GIT-LDFLAGS $(GITLIBS) compile_rust
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 		$(IMAP_SEND_LDFLAGS) $(LIBS)
 
-git-http-fetch$X: http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS)
+git-http-fetch$X: http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS) compile_rust
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 		$(CURL_LIBCURL) $(LIBS)
-git-http-push$X: http.o http-push.o GIT-LDFLAGS $(GITLIBS)
+git-http-push$X: http.o http-push.o GIT-LDFLAGS $(GITLIBS) compile_rust
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 		$(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS)
 
@@ -2911,11 +2934,11 @@ $(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY)
 	ln -s $< $@ 2>/dev/null || \
 	cp $< $@
 
-$(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o GIT-LDFLAGS $(GITLIBS)
+$(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o GIT-LDFLAGS $(GITLIBS) compile_rust
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 		$(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS)
 
-scalar$X: scalar.o GIT-LDFLAGS $(GITLIBS)
+scalar$X: scalar.o GIT-LDFLAGS $(GITLIBS) compile_rust
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
 		$(filter %.o,$^) $(LIBS)
 
@@ -2925,6 +2948,7 @@ $(LIB_FILE): $(LIB_OBJS)
 $(XDIFF_LIB): $(XDIFF_OBJS)
 	$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
 
+
 $(REFTABLE_LIB): $(REFTABLE_OBJS)
 	$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
 
@@ -3294,7 +3318,7 @@ perf: all
 
 t/helper/test-tool$X: $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS)) $(UNIT_TEST_DIR)/test-lib.o
 
-t/helper/test-%$X: t/helper/test-%.o GIT-LDFLAGS $(GITLIBS)
+t/helper/test-%$X: t/helper/test-%.o GIT-LDFLAGS $(GITLIBS) compile_rust
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(filter %.a,$^) $(LIBS)
 
 check-sha1:: t/helper/test-tool$X
@@ -3756,7 +3780,10 @@ cocciclean:
 	$(RM) -r .build/contrib/coccinelle
 	$(RM) contrib/coccinelle/*.cocci.patch
 
-clean: profile-clean coverage-clean cocciclean
+rustclean:
+	cd rust && cargo clean
+
+clean: profile-clean coverage-clean cocciclean rustclean
 	$(RM) -r .build $(UNIT_TEST_BIN)
 	$(RM) GIT-TEST-SUITES
 	$(RM) po/git.pot po/git-core.pot
@@ -3911,13 +3938,13 @@ FUZZ_CXXFLAGS ?= $(ALL_CFLAGS)
 .PHONY: fuzz-all
 fuzz-all: $(FUZZ_PROGRAMS)
 
-$(FUZZ_PROGRAMS): %: %.o oss-fuzz/dummy-cmd-main.o $(GITLIBS) GIT-LDFLAGS
+$(FUZZ_PROGRAMS): %: %.o oss-fuzz/dummy-cmd-main.o $(GITLIBS) GIT-LDFLAGS compile_rust
 	$(QUIET_LINK)$(FUZZ_CXX) $(FUZZ_CXXFLAGS) -o $@ $(ALL_LDFLAGS) \
 		-Wl,--allow-multiple-definition \
 		$(filter %.o,$^) $(filter %.a,$^) $(LIBS) $(LIB_FUZZING_ENGINE)
 
 $(UNIT_TEST_PROGS): $(UNIT_TEST_BIN)/%$X: $(UNIT_TEST_DIR)/%.o $(UNIT_TEST_OBJS) \
-	$(GITLIBS) GIT-LDFLAGS
+	$(GITLIBS) GIT-LDFLAGS compile_rust
 	$(call mkdir_p_parent_template)
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
 		$(filter %.o,$^) $(filter %.a,$^) $(LIBS)
@@ -3936,7 +3963,7 @@ $(UNIT_TEST_DIR)/clar.suite: $(UNIT_TEST_DIR)/clar-decls.h $(UNIT_TEST_DIR)/gene
 $(UNIT_TEST_DIR)/clar/clar.o: $(UNIT_TEST_DIR)/clar.suite
 $(CLAR_TEST_OBJS): $(UNIT_TEST_DIR)/clar-decls.h
 $(CLAR_TEST_OBJS): EXTRA_CPPFLAGS = -I$(UNIT_TEST_DIR)
-$(CLAR_TEST_PROG): $(UNIT_TEST_DIR)/clar.suite $(CLAR_TEST_OBJS) $(GITLIBS) GIT-LDFLAGS
+$(CLAR_TEST_PROG): $(UNIT_TEST_DIR)/clar.suite $(CLAR_TEST_OBJS) $(GITLIBS) GIT-LDFLAGS compile_rust
 	$(call mkdir_p_parent_template)
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
 
diff --git a/build_rust.sh b/build_rust.sh
new file mode 100755
index 000000000000..192385a1d961
--- /dev/null
+++ b/build_rust.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+
+rustc -vV || exit $?
+cargo --version || exit $?
+
+dir_git_root=${0%/*}
+dir_build=$1
+rust_build_profile=$2
+crate=$3
+
+dir_rust=$dir_git_root/rust
+
+if [ "$dir_git_root" = "" ]; then
+  echo "did not specify the directory for the root of git"
+  exit 1
+fi
+
+if [ "$dir_build" = "" ]; then
+  echo "did not specify the build directory"
+  exit 1
+fi
+
+if [ "$rust_build_profile" = "" ]; then
+  echo "did not specify the rust_build_profile"
+  exit 1
+fi
+
+if [ "$rust_build_profile" = "release" ]; then
+  rust_args="--release"
+  export RUSTFLAGS=''
+elif [ "$rust_build_profile" = "debug" ]; then
+  rust_args=""
+  export RUSTFLAGS='-C debuginfo=2 -C opt-level=1 -C force-frame-pointers=yes'
+else
+  echo "illegal rust_build_profile value $rust_build_profile"
+  exit 1
+fi
+
+cd $dir_rust && cargo clean && pwd && cargo build -p $crate $rust_args; cd $dir_git_root
+
+libfile="lib${crate}.a"
+if rustup show active-toolchain | grep windows-msvc; then
+  libfile="${crate}.lib"
+fi
+dst=$dir_build/$libfile
+
+if [ "$dir_git_root" != "$dir_build" ]; then
+  src=$dir_rust/target/$rust_build_profile/$libfile
+  if [ ! -f $src ]; then
+    echo >&2 "::error:: cannot find path of static library $src is not a file or does not exist"
+    exit 5
+  fi
+
+  rm $dst 2>/dev/null
+  mv $src $dst
+fi
diff --git a/git-compat-util.h b/git-compat-util.h
index 4678e21c4cb8..82dc99764ac0 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -196,6 +196,23 @@ static inline int is_xplatform_dir_sep(int c)
 #include "compat/msvc.h"
 #endif
 
+/* rust types */
+typedef uint8_t   u8;
+typedef uint16_t  u16;
+typedef uint32_t  u32;
+typedef uint64_t  u64;
+
+typedef int8_t    i8;
+typedef int16_t   i16;
+typedef int32_t   i32;
+typedef int64_t   i64;
+
+typedef float     f32;
+typedef double    f64;
+
+typedef size_t    usize;
+typedef ptrdiff_t isize;
+
 /* used on Mac OS X */
 #ifdef PRECOMPOSE_UNICODE
 #include "compat/precompose_utf8.h"
diff --git a/meson.build b/meson.build
index 596f5ac7110e..324f968338b9 100644
--- a/meson.build
+++ b/meson.build
@@ -267,6 +267,40 @@ 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'))
 
+if get_option('optimization') in ['2', '3', 's', 'z']
+  rust_build_profile = 'release'
+else
+  rust_build_profile = 'debug'
+endif
+
+# Run `rustup show active-toolchain` and capture output
+rustup_out = run_command('rustup', 'show', 'active-toolchain',
+                         check: true).stdout().strip()
+
+rust_crates = ['xdiff']
+rust_builds = []
+
+foreach crate : rust_crates
+  if rustup_out.contains('windows-msvc')
+    libfile = crate + '.lib'
+  else
+    libfile = 'lib' + crate + '.a'
+  endif
+
+  rust_builds += custom_target(
+    'rust_build_'+crate,
+    output: libfile,
+    build_by_default: true,
+    build_always_stale: true,
+    command: [
+      meson.project_source_root() / 'build_rust.sh',
+      meson.current_build_dir(), rust_build_profile, crate,
+    ],
+    install: false,
+  )
+endforeach
+
+
 compiler = meson.get_compiler('c')
 
 libgit_sources = [
@@ -1678,14 +1712,16 @@ version_def_h = custom_target(
 libgit_sources += version_def_h
 
 libgit = declare_dependency(
-  link_with: static_library('git',
-    sources: libgit_sources,
-    c_args: libgit_c_args + [
-      '-DGIT_VERSION_H="' + version_def_h.full_path() + '"',
-    ],
-    dependencies: libgit_dependencies,
-    include_directories: libgit_include_directories,
-  ),
+  link_with: [
+    static_library('git',
+      sources: libgit_sources,
+      c_args: libgit_c_args + [
+        '-DGIT_VERSION_H="' + version_def_h.full_path() + '"',
+      ],
+      dependencies: libgit_dependencies,
+      include_directories: libgit_include_directories,
+    ),
+  ] + rust_builds,
   compile_args: libgit_c_args,
   dependencies: libgit_dependencies,
   include_directories: libgit_include_directories,
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
new file mode 100644
index 000000000000..ed3d79d7f827
--- /dev/null
+++ b/rust/Cargo.toml
@@ -0,0 +1,6 @@
+[workspace]
+members = [
+    "xdiff",
+    "interop",
+]
+resolver = "2"
diff --git a/rust/interop/Cargo.toml b/rust/interop/Cargo.toml
new file mode 100644
index 000000000000..045e3b01cfad
--- /dev/null
+++ b/rust/interop/Cargo.toml
@@ -0,0 +1,14 @@
+[package]
+name = "interop"
+version = "0.1.0"
+edition = "2021"
+
+[lib]
+name = "interop"
+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/interop/src/lib.rs b/rust/interop/src/lib.rs
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/rust/xdiff/Cargo.toml b/rust/xdiff/Cargo.toml
new file mode 100644
index 000000000000..eb7966aada64
--- /dev/null
+++ b/rust/xdiff/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+name = "xdiff"
+version = "0.1.0"
+edition = "2021"
+
+[lib]
+name = "xdiff"
+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]
+interop = { path = "../interop" }
diff --git a/rust/xdiff/src/lib.rs b/rust/xdiff/src/lib.rs
new file mode 100644
index 000000000000..e69de29bb2d1
-- 
gitgitgadget
Previous: brian m. carlson via GitGitGadgetNext: rsbecker@nexbridge.com
Message 127 of 204 in “RFC: Accelerate xdiff and begin its rustification”
  1. 0/7 RFC: Accelerate xdiff and begin its rustificationEzekiel Newren via GitGitGadget, Jul 17, 2025
  2. 1/7 xdiff: introduce rustEzekiel Newren via GitGitGadget, Jul 17, 2025
  3. brian m. carlsonJul 17, 2025
  4. Junio C HamanoJul 17, 2025
  5. Taylor BlauJul 17, 2025
  6. Ezekiel NewrenJul 18, 2025
  7. brian m. carlsonJul 23, 2025
  8. Junio C HamanoJul 23, 2025
  9. Ezekiel NewrenJul 28, 2025
  10. brian m. carlsonJul 31, 2025
  11. Mike HommeyJul 22, 2025
  12. brian m. carlsonJul 22, 2025
  13. Taylor BlauJul 17, 2025
  14. 2/7 xdiff/xprepare: remove superfluous forward declarationsEzekiel Newren via GitGitGadget, Jul 17, 2025
  15. Taylor BlauJul 17, 2025
  16. 3/7 xdiff: delete unnecessary fields from xrecord_t and xdfile_tEzekiel Newren via GitGitGadget, Jul 17, 2025
  17. 4/7 xdiff: make fields of xrecord_t Rust friendlyEzekiel Newren via GitGitGadget, Jul 17, 2025
  18. Taylor BlauJul 17, 2025
  19. brian m. carlsonJul 17, 2025
  20. Elijah NewrenJul 17, 2025
  21. Taylor BlauJul 18, 2025
  22. Taylor BlauJul 18, 2025
  23. Phillip WoodJul 18, 2025
  24. Ezekiel NewrenJul 28, 2025
  25. Phillip WoodJul 28, 2025
  26. Ezekiel NewrenJul 28, 2025
  27. Phillip WoodJul 31, 2025
  28. Ezekiel NewrenJul 31, 2025
  29. Phillip WoodAug 1, 2025
  30. Junio C HamanoJul 28, 2025
  31. Collin FunkJul 28, 2025
  32. Johannes SchindelinJul 20, 2025
  33. 5/7 xdiff: separate parsing lines from hashing themEzekiel Newren via GitGitGadget, Jul 17, 2025
  34. Taylor BlauJul 17, 2025
  35. Phillip WoodJul 18, 2025
  36. 6/7 xdiff: conditionally use Rust's implementation of xxhashEzekiel Newren via GitGitGadget, Jul 17, 2025
  37. Taylor BlauJul 17, 2025
  38. Junio C HamanoJul 18, 2025
  39. Ezekiel NewrenJul 31, 2025
  40. Matthias AßhauerAug 2, 2025
  41. Johannes SchindelinJul 19, 2025
  42. Phillip WoodJul 20, 2025
  43. gitoxide-compatible licensing of Git's Rust code, was Re: [PATCH 6/7] xdiff: conditionally use Rust's implementation of xxhashJohannes Schindelin, Sep 23, 2025
  44. Jeff KingSep 23, 2025
  45. Phillip WoodSep 24, 2025
  46. Jeff KingSep 25, 2025
  47. Patrick SteinhardtSep 25, 2025
  48. Phillip WoodSep 26, 2025
  49. Jeff KingOct 3, 2025
  50. Phillip WoodOct 3, 2025
  51. Patrick SteinhardtOct 7, 2025
  52. Johannes SchindelinNov 17, 2025
  53. Yee Cheng ChinOct 5, 2025
  54. 7/7 github_workflows: install rustEzekiel Newren via GitGitGadget, Jul 17, 2025
  55. brian m. carlsonJul 17, 2025
  56. Ezekiel NewrenJul 18, 2025
  57. Ben KnobleJul 25, 2025
  58. Johannes SchindelinJul 19, 2025
  59. brian m. carlsonJul 17, 2025
  60. Taylor BlauJul 17, 2025
  61. brian m. carlsonJul 18, 2025
  62. Patrick SteinhardtJul 22, 2025
  63. Junio C HamanoJul 22, 2025
  64. Sam JamesJul 22, 2025
  65. Elijah NewrenJul 22, 2025
  66. Sam JamesJul 22, 2025
  67. Collin FunkJul 22, 2025
  68. Christian BrabandtJul 18, 2025
  69. Junio C HamanoJul 18, 2025
  70. Elijah NewrenJul 19, 2025
  71. Phillip WoodJul 18, 2025
  72. Eli SchwartzJul 18, 2025
  73. Haelwenn (lanodan) MonnierJul 19, 2025
  74. Patrick SteinhardtJul 22, 2025
  75. Patrick SteinhardtJul 22, 2025
  76. Eli SchwartzJul 22, 2025
  77. Sam JamesJul 22, 2025
  78. Patrick SteinhardtJul 23, 2025
  79. Pierre-Emmanuel PatryJul 24, 2025
  80. Patrick SteinhardtJul 24, 2025
  81. Pierre-Emmanuel PatryJul 28, 2025
  82. Junio C HamanoJul 18, 2025
  83. Ezekiel NewrenJul 18, 2025
  84. Phillip WoodJul 21, 2025
  85. Junio C HamanoJul 21, 2025
  86. Johannes SchindelinJul 19, 2025
  87. Matthias AßhauerJul 20, 2025
  88. 00/17 RFC: Accelerate xdiff and begin its rustificationEzekiel Newren via GitGitGadget, Aug 15, 2025
  89. 01/17 doc: add a policy for using Rustbrian m. carlson via GitGitGadget, Aug 15, 2025
  90. Matthias AßhauerAug 15, 2025
  91. Junio C HamanoAug 15, 2025
  92. Matthias AßhauerAug 16, 2025
  93. Ezekiel NewrenAug 19, 2025
  94. 02/17 xdiff: introduce rustEzekiel Newren via GitGitGadget, Aug 15, 2025
  95. 03/17 xdiff/xprepare: remove superfluous forward declarationsEzekiel Newren via GitGitGadget, Aug 15, 2025
  96. 04/17 xdiff: delete unnecessary fields from xrecord_t and xdfile_tEzekiel Newren via GitGitGadget, Aug 15, 2025
  97. 05/17 xdiff: make fields of xrecord_t Rust friendlyEzekiel Newren via GitGitGadget, Aug 15, 2025
  98. 06/17 xdiff: separate parsing lines from hashing themEzekiel Newren via GitGitGadget, Aug 15, 2025
  99. 07/17 xdiff: conditionally use Rust's implementation of xxhashEzekiel Newren via GitGitGadget, Aug 15, 2025
  100. 08/17 github workflows: install rustEzekiel Newren via GitGitGadget, Aug 15, 2025
  101. 09/17 Do support Windows again after requiring RustJohannes Schindelin via GitGitGadget, Aug 15, 2025
  102. Matthias AßhauerAug 15, 2025
  103. Junio C HamanoAug 15, 2025
  104. Johannes SchindelinAug 15, 2025
  105. Junio C HamanoAug 15, 2025
  106. Junio C HamanoAug 15, 2025
  107. Matthias AßhauerAug 16, 2025
  108. Junio C HamanoAug 17, 2025
  109. Ezekiel NewrenAug 19, 2025
  110. 10/17 win+Meson: allow for xdiff to be compiled with MSVCJohannes Schindelin via GitGitGadget, Aug 15, 2025
  111. 11/17 win+Meson: do allow linking with the Rust-built xdiffJohannes Schindelin via GitGitGadget, Aug 15, 2025
  112. 12/17 github workflows: define rust versions and targets in the same placeEzekiel Newren via GitGitGadget, Aug 15, 2025
  113. 13/17 github workflows: upload Cargo.lockEzekiel Newren via GitGitGadget, Aug 15, 2025
  114. 14/17 xdiff: implement a white space iterator in RustEzekiel Newren via GitGitGadget, Aug 15, 2025
  115. 15/17 xdiff: create line_hash() and line_equal()Ezekiel Newren via GitGitGadget, Aug 15, 2025
  116. 16/17 xdiff: optimize case where --ignore-cr-at-eol is the only whitespace flagEzekiel Newren via GitGitGadget, Aug 15, 2025
  117. 17/17 xdiff: use rust's version of whitespace processingEzekiel Newren via GitGitGadget, Aug 15, 2025
  118. Ramsay JonesAug 15, 2025
  119. Elijah NewrenAug 19, 2025
  120. Patrick SteinhardtAug 24, 2025
  121. Junio C HamanoAug 18, 2025
  122. Ben KnobleAug 18, 2025
  123. Elijah NewrenAug 19, 2025
  124. Junio C HamanoAug 19, 2025
  125. 00/15 RFC: Cleanup xdiff and begin its rustificationEzekiel Newren via GitGitGadget, Aug 23, 2025
  126. 01/15 doc: add a policy for using Rustbrian m. carlson via GitGitGadget, Aug 23, 2025
  127. 02/15 xdiff: introduce rustEzekiel Newren via GitGitGadget, Aug 23, 2025
  128. rsbecker@nexbridge.comAug 23, 2025
  129. Kristoffer HaugsbakkAug 23, 2025
  130. rsbecker@nexbridge.comAug 23, 2025
  131. Elijah NewrenAug 23, 2025
  132. brian m. carlsonAug 23, 2025
  133. rsbecker@nexbridge.comAug 23, 2025
  134. Sam JamesAug 23, 2025
  135. Haelwenn (lanodan) MonnierAug 23, 2025
  136. Taylor BlauAug 27, 2025
  137. rsbecker@nexbridge.comAug 27, 2025
  138. Junio C HamanoAug 27, 2025
  139. rsbecker@nexbridge.comAug 27, 2025
  140. Taylor BlauAug 27, 2025
  141. Junio C HamanoAug 27, 2025
  142. Patrick SteinhardtSep 2, 2025
  143. Sam JamesSep 2, 2025
  144. brian m. carlsonSep 2, 2025
  145. Sam JamesSep 2, 2025
  146. Collin FunkSep 3, 2025
  147. Patrick SteinhardtSep 3, 2025
  148. Ramsay JonesSep 3, 2025
  149. Junio C HamanoSep 3, 2025
  150. Josh SteadmonSep 3, 2025
  151. Patrick SteinhardtSep 4, 2025
  152. Junio C HamanoSep 4, 2025
  153. Patrick SteinhardtSep 5, 2025
  154. brian m. carlsonSep 4, 2025
  155. Patrick SteinhardtSep 4, 2025
  156. Sam JamesSep 4, 2025
  157. Elijah NewrenSep 5, 2025
  158. Ezekiel NewrenSep 4, 2025
  159. Elijah NewrenSep 5, 2025
  160. Patrick SteinhardtSep 5, 2025
  161. Elijah NewrenSep 7, 2025
  162. rsbecker@nexbridge.comSep 7, 2025
  163. Phillip WoodSep 8, 2025
  164. rsbecker@nexbridge.comSep 8, 2025
  165. Ezekiel NewrenSep 8, 2025
  166. rsbecker@nexbridge.comSep 8, 2025
  167. Elijah NewrenSep 8, 2025
  168. rsbecker@nexbridge.comSep 8, 2025
  169. Elijah NewrenSep 8, 2025
  170. rsbecker@nexbridge.comSep 8, 2025
  171. Patrick SteinhardtSep 8, 2025
  172. Phillip WoodSep 5, 2025
  173. Sam JamesSep 5, 2025
  174. Phillip WoodSep 5, 2025
  175. Patrick SteinhardtSep 5, 2025
  176. Junio C HamanoSep 5, 2025
  177. Patrick SteinhardtSep 8, 2025
  178. Ezekiel NewrenAug 23, 2025
  179. 03/15 github workflows: install rustEzekiel Newren via GitGitGadget, Aug 23, 2025
  180. 04/15 win+Meson: do allow linking with the Rust-built xdiffJohannes Schindelin via GitGitGadget, Aug 23, 2025
  181. 05/15 github workflows: upload Cargo.lockEzekiel Newren via GitGitGadget, Aug 23, 2025
  182. 06/15 ivec: create a vector type that is interoperable between C and RustEzekiel Newren via GitGitGadget, Aug 23, 2025
  183. Kristoffer HaugsbakkAug 23, 2025
  184. Ezekiel NewrenAug 23, 2025
  185. Junio C HamanoAug 23, 2025
  186. Ezekiel NewrenAug 23, 2025
  187. Junio C HamanoAug 23, 2025
  188. Ezekiel NewrenAug 23, 2025
  189. Elijah NewrenAug 25, 2025
  190. Junio C HamanoAug 26, 2025
  191. Ben KnobleAug 24, 2025
  192. Ezekiel NewrenAug 25, 2025
  193. D. Ben KnobleAug 26, 2025
  194. Ezekiel NewrenAug 26, 2025
  195. brian m. carlsonAug 26, 2025
  196. 07/15 xdiff/xprepare: remove superfluous forward declarationsEzekiel Newren via GitGitGadget, Aug 23, 2025
  197. 08/15 xdiff: delete unnecessary fields from xrecord_t and xdfile_tEzekiel Newren via GitGitGadget, Aug 23, 2025
  198. 09/15 xdiff: make fields of xrecord_t Rust friendlyEzekiel Newren via GitGitGadget, Aug 23, 2025
  199. 10/15 xdiff: use one definition for freeing xdfile_tEzekiel Newren via GitGitGadget, Aug 23, 2025
  200. 11/15 xdiff: replace chastore with an ivec in xdfile_tEzekiel Newren via GitGitGadget, Aug 23, 2025
  201. 12/15 xdiff: delete nrec field from xdfile_tEzekiel Newren via GitGitGadget, Aug 23, 2025
  202. 14/15 xdiff: make xdfile_t more rust friendlyEzekiel Newren via GitGitGadget, Aug 23, 2025
  203. 13/15 xdiff: delete recs field from xdfile_tEzekiel Newren via GitGitGadget, Aug 23, 2025
  204. 15/15 xdiff: implement xdl_trim_ends() in RustEzekiel Newren via GitGitGadget, Aug 23, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.