mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-06-10 06:00:02 +02:00
![]() - While doing cross-compiling of Forgejo (with CGO enabled) it was noticed that besides compiling sqlite3, github.com/DataDog/zstd (a CGO wrapper around the reference zstd library) took a long time to compile. Upon investigating why this library was included in the first place I concluded that this library is not even used and compiling this package is a waste of time and CPU cycles.
- https://github.com/sassoftware/go-rpmutils is the library that uses the CGO zstd library, and would use it the pure Go variant (https://github.com/klauspost/compress/zstd) if CGO is enabled (which is the default). It uses zstd to uncompress the payload of a RPM packages. This is a operation that Forgejo does not use in the slightest, hence being unused code.
- It is not possible to force compiling the pure Go variant if CGO is enabled. Therefore forking and removing this code is the only option to avoid compiling the zstd C library. The changes made to the fork can be seen here:
|
||
---|---|---|
.. | ||
alpine | ||
arch | ||
cargo | ||
chef | ||
composer | ||
conan | ||
conda | ||
container | ||
cran | ||
debian | ||
goproxy | ||
helm | ||
maven | ||
npm | ||
nuget | ||
pub | ||
pypi | ||
rpm | ||
rubygems | ||
swift | ||
vagrant | ||
content_store.go | ||
hashed_buffer.go | ||
hashed_buffer_test.go | ||
multi_hasher.go | ||
multi_hasher_test.go |