]> git.ipfire.org Git - thirdparty/git.git/commit
hash: expose hash context functions to Rust
authorbrian m. carlson <sandals@crustytoothpaste.net>
Mon, 17 Nov 2025 22:16:16 +0000 (22:16 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Nov 2025 22:24:15 +0000 (14:24 -0800)
commitf29070cb25863cdff181c5cd1f5f9ad6a0c1caed
tree23861d5868cfb5ce5027d0404e9ac61506810093
parentf00c4ace1e9b43591f08dac324a0e7ef3172854d
hash: expose hash context functions to Rust

We'd like to be able to hash our data in Rust using the same contexts as
in C.  However, we need our helper functions to not be inline so they
can be linked into the binary appropriately.  In addition, to avoid
managing memory manually and since we don't know the size of the hash
context structure, we want to have simple alloc and free functions we
can use to make sure a context can be easily dynamically created.

Expose the helper functions and create alloc, free, and init functions
we can call.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
hash.c
hash.h