{"thread":{"id":"63852","subject":"Re: [PATCH 0/7] RFC: Accelerate xdiff and begin its rustification","startedAt":"2025-07-25T23:53:43Z","lastAt":"2025-07-25T23:53:43Z","messageCount":1,"participants":["Ben Knoble"],"isPatch":true,"patchVersion":1,"patchTotal":7},"messages":[{"id":"522776","messageId":"35287949-FD3E-4A5B-BC8E-A2389A077133@gmail.com","threadId":"63852","inReplyTo":null,"subject":"Re: [PATCH 0/7] RFC: Accelerate xdiff and begin its rustification","fromName":"Ben Knoble","fromEmail":"ben.knoble@gmail.com","sentAt":"2025-07-25T23:53:31Z","receivedAt":"2025-07-25T23:53:43Z","isPatch":true,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"﻿\n> Le 22 juil. 2025 à 08:25, Patrick Steinhardt <ps@pks.im> a écrit :\n> \n> ﻿On Sat, Jul 19, 2025 at 02:48:39AM +0200, Haelwenn (lanodan) Monnier wrote:\n>> [2025-07-18 17:25:01-0400] Eli Schwartz:\n>>> On 7/18/25 9:34 AM, Phillip Wood wrote:\n>>>> Hi Ezekiel\n>>>> Thanks for working on this\n>>>> On 17/07/2025 21:32, Ezekiel Newren via GitGitGadget wrote:\n>>>>> So...\n>>>>> This obviously raises the question of whether we are ready to accept a\n>>>>> hard\n>>>>> dependency on Rust. Previous discussions on the mailing list and at Git\n>>>>> Merge 2024 have not answered that question. If not now, will we be\n>>>>> willing\n>>>>> to accept such a hard dependency later? And what route do we want to\n>>>>> take to\n>>>>> get there?\n>>>> As far as git goes I think introducing a hard dependency on rust is\n>>>> fine. It is widely supported, the only issue I'm aware of is the lack of\n>>>> support on NonStop and I don't think it is reasonable for such a\n>>>> minority platform to hold the rest of the project to ransom. There is a\n>>>> question about the other users of the xdiff code though. libgit2 carries\n>>>> a copy as do other projects like neovim. I've cc'd the libgit2\n>>>> maintainer and posted a link to this thread in neovim github [1]\n>>> A hard dependency on rust for Gentoo amd64 would potentially require\n>>> building https://github.com/thepowersgang/mrustc followed by building 13\n>>> and counting versions of rustc in order to get to the latest version.\n>>> What is the minimum supported version in this series, by the way?\n>>> bin packages for rust do exist but not everyone wants to use non-distro\n>>> provided binaries, sometimes for auditability reasons.\n>>> For Gentoo HPPA, Alpha, m68k it will simply mean the removal (or end of\n>>> life and staying forever on 2.50, perhaps) of Git. There is no rust\n>>> compiler there.\n>>> Even s390 support for rust is limited to a precompiled version not\n>>> everyone is willing to use.\n>> Also in other distro concerns, if it trickles down to libgit2,\n>> extra care should be taken to avoid creating circular dependencies\n>> due to cargo depending on libgit2 (via git2 crate).\n>> For example with making sure it can reasonably be built via meson's\n>> Rust support rather than through cargo.\n> \n> I think it's unlikely that this eventually trickles down into libgit2.\n> The bundled versions of xdiff have already diverged for a long time, and\n> unfortunately libgit2 is mostly in maintenance mode nowadays. So I guess\n> that this change here just means that things will diverge even further\n> in the future, which is probably okay-ish. After all, the whole xdiff\n> library didn't really evolve in a fast pace over the last years.\n> \n> That being said, there is an xdiff fork located at [1] that libgit2\n> maintains nowadays. So if the Rust dependency ever became a problem for\n> any of the downstream users I think we could simply redirect them to\n> that fork and make it the canonical upstream for C-only xdiff.\n\n/cc Christian: if Vim absolutely demands a C-only xdiff, this may be a good place to get it long-term.\n\nMy preference would be for Vim to be able to get the benefits of Rusty xdiff or other speed up/safety benefits without extreme porting efforts (translating Rust patches back to C?), so perhaps a build mode that allowed me to supply my own xdiff lib would be ok as a start.\n\nI’d be willing to lend a hand to help Vim support Rusty xdiff directly, too.\n\n> \n> Patrick\n> \n> [1]: https://github.com/libgit2/xdiff\n"}]}