@parcel/rust package should only install binaries for the host platform
broofa opened this issue · comments
Problem
@parcel/rust
is installing binaries for all supported platforms, on every platform. This bloats the install footbrint by 165-169MB.
Current Behavior
For example, with a fresh install (new, empty directory):
Desired Behavior
parcel
should only install the one binary needed for the current host os
/cpu
architecture.
I know this is a non-trivial problem, but other projects seem to have solved this. E.g. esbuild
ships it's binaries as separate optionalDependencies
and relies on the package manager to decide which one to install. (It's worth noting that they had considerable discussion on this topic before settling on this solution.)
Yes, we definitely want this. It's just that somebody need to implement it.
https://github.com/parcel-bundler/lightningcss has this approach as well, and that seems to work well.
Previous discussion: #6483
and that seems to work well
...mostly. There are some issues with package managers not installing any of the optional dependencies sometimes.