Re: [PATCH 6/7] xdiff: conditionally use Rust's implementation of xxhash
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 19, 2025, 21:53 UTC
- Message-ID
- <5596e569-6632-c2b1-37af-a978de5408cd@gmx.de>
- In-Reply-To
- <5a959c9bdad79cf972b95dcf4324135dd7c94dac.1752784344.git.gitgitgadget@gmail.com>
Hi Ezekiel,
On Thu, 17 Jul 2025, Ezekiel Newren via GitGitGadget wrote:
Show 12 quoted lines
> diff --git a/rust/xdiff/src/lib.rs b/rust/xdiff/src/lib.rs
> index e69de29bb2d1..96975975a1ba 100644
> --- a/rust/xdiff/src/lib.rs
> +++ b/rust/xdiff/src/lib.rs
> @@ -0,0 +1,7 @@
> +
> +
> +#[no_mangle]
> +unsafe extern "C" fn xxh3_64(ptr: *const u8, size: usize) -> u64 {
> + let slice = std::slice::from_raw_parts(ptr, size);
> + xxhash_rust::xxh3::xxh3_64(slice)
> +}I know that this is a pretty small file, but I do notice that it does not have a license header.
This reminds me of the unfortunate oversight to be careful about making (and keeping) libgit.a's source files compatible with libgit2's license to nurture a fruitful exchange between those two projects.
With Rust, we still have a really good chance to learn from history and avoid that mistake: Gitoxide is a very exciting project with clear overlap in its mission to implement Git functionality in Rust. Gitoxide is dual-licensed under the Apache License v2 and the MIT license (see https://github.com/GitoxideLabs/gitoxide?tab=readme-ov-file#license).
Would you mind adding a license header to that file that explicitly allows the contents of the file to be used in Gitoxide, to get the Rust effort started on a good foot?
Thank you, Johannes