zed icon indicating copy to clipboard operation
zed copied to clipboard

Offer arm64/x64 binaries individually

Open probablykasper opened this issue 1 year ago • 1 comments
trafficstars

Check for existing issues

  • [X] Completed

Describe the feature

I'd like to install the x86_64 version only, instead of the universal binary. This should take the app from 350MB to 187MB or less

If applicable, add mockups / screenshots to help present your vision of the feature

image

probablykasper avatar Jan 27 '24 03:01 probablykasper

+1 to that, though one difficulty lies in the fact that we do not provide the CPU architecture in the asset download query (see this query line). That is relevant for older Zed installations - how can a universal binary (UB) version upgrade to non-universal binary (NUB) version? We'd have to handle that transition gracefully, which means having a transition period of sorts:

  1. We could roll out the URL change first (so that the zed.dev backend knows the architecture of the client requesting the update) and only roll out the bundling change once a vast majority of our users uses the version that provides the architecture in the update request. That I think would take few weeks.
  2. We could start shipping the NUBs straight away, keeping the old asset in place for update requests that do not provide a CPU architecture. That allows us to switch to NUB with overhead in release process for a few weeks.

I'd lean towards first option.

While we're at it, it might be worthwhile to add the platform to the request as well, though that won't be useful in that particular task. :)

osiewicz avatar Jan 27 '24 12:01 osiewicz

The query params are now in main/nightly, so we just have to let that sit a bit so that most users are on a build that provides architecture in a query. I'll revisit this issue in a few weeks probably.

osiewicz avatar Jan 30 '24 08:01 osiewicz

We've just landed it in nightly. The following Stable and Preview releases are gonna be about ~60Mb smaller. :) image Zed.dmg in that screenshot is the universal binary built from the same commit.

osiewicz avatar Mar 15 '24 18:03 osiewicz

That's it folks, latest stable is using single architecture binaries (and today's Preview is 20Mb smaller than that, likely due to us shifting some languages into extensions). We do plan to phase out universal binaries at some point (likely within a month or two), but for now they're still built in CI just in case we get an old client that tries to update. The update process of recent Zed versions prioritizes upgrading to a single architecture binaries over universal binaries.

Feel free to reopen this ticket if you run into any issues.

osiewicz avatar Mar 27 '24 20:03 osiewicz