Firstyear / obs-service-cargo

OBS Source Service and utilities for Rust software packaging
Mozilla Public License 2.0
16 stars 9 forks source link

Reduce vendoring size #37

Closed flukejones closed 5 months ago

flukejones commented 12 months ago

Vendoring should consider using https://github.com/coreos/cargo-vendor-filterer

This can avoid packaing many unrequired crates such as the absurd amount of Windows cruft that also includes many built binaries. Leaving these out can reduce some vendoring down to a quarter of the size.

I changed the command to output = run_cargo(appDirectory, "vendor-filterer", argsList + ["--platform", "x86_64-unknown-linux-gnu", "vendor"]).

This is likely going to require either detecting the target triple, or forcing it to be passed as an arg.

Firstyear commented 11 months ago

@flukejones This is a good idea. We actually are just in the middle of rewriting this from python to rust, so once that's done, we could consider this next :)

uncomfyhalomacro commented 11 months ago

this is cool

uncomfyhalomacro commented 10 months ago

@flukejones sadly, inconsistency in cargo-vendor-filterer behavior is leading me to close the PR. Until then, if the situation improves, we will revisit this issue. :)

uncomfyhalomacro commented 10 months ago

for now, I and firstyear will just say that the current compression algos/tools we use really reduced tarball sizes. Maybe I can fork cargo-vendor-filterer or write my own but that's a PITA and I don't have time to do so, unfortunately 😭

uncomfyhalomacro commented 10 months ago

As of now, there are no better way to do it or it still needs a re-discussion. Closing for now.

flukejones commented 5 months ago

@uncomfyhalomacro what is the inconsistency?

uncomfyhalomacro commented 5 months ago

see #48. i have some comments there

uncomfyhalomacro commented 5 months ago

Closed as completed in #77