On Fri, Jul 18, 2025 at 9:26 AM Junio C Hamano <gitster@xxxxxxxxx> wrote: > > Christian Brabandt <cb@xxxxxxxxxx> writes: > [...] > > Just a quick heads-up: We (as in Vim/Neovim) have been using gits xdiff > > library for use in Vim and Neovim. > > > > Is the plan to get rid of xdiffs C source completely and replace it by a > > Rust implementation? > > As far as I know, there is no such plan that is widely agreed upon > (yet). Yeah, Ezekiel just barely notified the community of his efforts yesterday with this patch series. :-) > The discussion starter thread you are looking at only introduces a > new code path that uses a different line hash function written in > Rust when whitespace munging search is not enabled, and everything > else still is written in C, but since it is just a discussion > starter so far. > > I would personally have liked the effort to start with xmerge code, > not xdiff machinery, for various reasons, but that may be just me > ;-) We have both xdiff/xmerge.[ch] and xdiff/{xdiff.h,xdiffi.[ch]}. When you say "xdiff", I suspect that you're referring to the files within the directory rather than to the whole directory, yes? I actually pointed Ezekiel at xhistogram to start (and thought he might only do that file), then he backed up to xprepare, and then he continued from there on to other bits of xdiff/, including xmerge. Different parts are at different stages of conversion and testing. He's not just transliterating but also trying to both clean up the code and look for performance improvements (and it's sometimes hard to do both; he's hit a few maintainability vs. performance tradeoffs and those will likely result in some questions on the list at some point). It's been a long slog, especially given how arcane xdiff sometimes feels. Anyway, along the way, he recognized the DJB2a hash -- something I certainly wouldn't have recognized or even thought to investigate. It led him to this optimization, which I thought was a really good find, and it seemed like it'd make for a good initial series to send to the list to get a feel for what people thought about possibly Rustifying xdiff/.