stellar / stellar-cli

CLI for Soroban contracts.
65 stars 55 forks source link

Make installing binary releases a native experience #1446

Open leighmcculloch opened 2 months ago

leighmcculloch commented 2 months ago

Installing the CLI from source is the primary way we advertise installing the CLI.

However, building from source is time consuming and makes some assumptions about environment setup, additional compilers like a C compiler, and uses non-trivial amounts of memory resources, bandwidth, CPU capabilities, and ... patience.

We also prebuild binaries for Windows (x86), macOS (x86, arm64), and Linux (x86, arm64). Theoretically no one needs to build from source except those on esoteric systems. In terms of commands on the command line installing from source is the simplest, and so I think it is highly unlikely that folks use the prebuilt binaries much, especially given than our CI job for publishing the binaries is partly broken and requires manual running after each release and even on times we've forgotten no one has complained.

We should make these binaries easy to install using tools folks already have on their system.

While we do support cargo-bininstall, that binary is not often installed for folks and itself is a reasonably large installation. It's a good option to have on hand for folks who have it, but shouldn't be the core of the distribution story.

I think we should make a one line shell script install that works for the majority of users:

curl -L https://cli.stellar.org | bash

And similar for Windows if such a command exists, or winget is probably more appropriate given it is built-in to Windows.

I think we should also add release targets for all of the following, over time. For any platform where multiple options are listed, I've ordered them by priority.

Crossplatform

Windows (x86)

macOS (x86, arm64)

Linux (x86, arm64)

CI

leighmcculloch commented 2 months ago

Of the options the most important of these to prioritise is probably winget, because it seems like of folks who have issues building and installing the CLI, windows users are most represented. I'd happily take it, but I don't have access to windows and it'd be good if a native windows user could explore it. (cc @fnando Not sure if that's something you could do with your windows machine. I assigned you, but feel free to unassign yourself.)

leighmcculloch commented 2 months ago

Of the options that are low hanging fruit quick wins, that's homebrew binaries, because we already have a homebrew-tap and it's a short step to add binaries 🤞🏻. I'm going to take doing that because I'm familiar with homebrew.

fnando commented 2 months ago

I won't have access to a Windows machine until the end of August, but I can take a look after that.

leighmcculloch commented 1 month ago