-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package fetching: support .tar.zst archives #17552
Conversation
Thanks! Yes please add the proper mime type detection as well. You should be able to find an official mime type database somewhere; no need to find an example web server, just support the standard. |
Can you also share how this affects compiler binary size? The zstd implementation looks a bit hefty. Since it's a less commonly used format, it might make sense to rely on a fetch plugin for this one if it adds too much bloat to the compiler. |
Looks like the difference is exactly 26KiB (before the couple extra bytes from adding > du -b zig-zstd-fetch zig-ca690ffa2
207191680 zig-zstd-fetch
207165056 zig-ca690ffa2
> echo "207191680 - 207165056" | bc
26624
> echo "1024 * 26" | bc
26624 These numbers are for |
I think those sizes are unstripped, yeah? You'll probably see an even smaller delta if you run |
I think it would have been unstripped - is there a particular invocation of |
I got the same as you and I was briefly surprised, however, I figured it out. We both have configured cmake with So - never mind, I think your original sizes are already stripped. Thanks for checking! |
be9ff46
to
ad2becd
Compare
I've added detection for the |
Looks like the |
Just a note: the compiler already depends on the zstd implementation through std.http (for http decompression), so it shouldn't bloat size much if at all. |
Gotcha, thanks for pointing that out! |
Resolves #14299.
I have tested this with
zig fetch
on a local.tar.zst
archive, but I'm not aware of any code forges online that produce zstandard compressed archives. As I haven't been able to test against code forges I have not added any http content type recognition - should I just addapplication/zstd
and/orapplication/tar+zstd
or leave it until someone needs it in the future?