Skip to content
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

CLI: build with dist #1593

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

svix-onelson
Copy link
Contributor

@svix-onelson svix-onelson commented Dec 26, 2024

Adds workflows and supporting configs to use dist for building and publishing binaries for the CLI.

To lean towards dist's happy path, a top-level Cargo.toml defines a workspace including any cargo projects we want to build and distribute (currently just svix-cli).

The dist-workspace.toml includes various parameters set by dist init to configure the generation of .github/workflows/release.yml.

dist-workspace.toml can be edited manually, but the release.yml should only be changed via dist generate.

Installers

Currently, only the shell installer is configured. dist provides several others including:

  • npm
  • homebrew (we'll definitely enable this one once we know everything looks good)
  • msi
  • powershell

shell is essentially "curl to bash" like is commonly done for rustup and seemed like the closest thing we'd see to a "hello world." My plan is to enable more in subsequent releases.

Status

Currently the build is broken because we're missing sources in the Rust SDK (i.e the codegen script isn't run during the workflows).

This will be fixed by committing those sources to git afaik. TBD.

Open Questions

Install Location

The dist default mimics what cargo install does (i.e. $CARGO_HOME/bin). This is great if you just happen to be a Rust dev, but for other folk it's not meaningful. We can pick a path, so should we?

Maybe ~/.svix/bin?

The installer script will offer to modify the PATH just like rustup does, so it seems like anything is fair game.

@svix-onelson svix-onelson force-pushed the onelson/cli-build-with-dist branch 2 times, most recently from 44dd9ba to 0ce1afa Compare December 27, 2024 02:15
@svix-onelson svix-onelson force-pushed the onelson/cli-build-with-dist branch from 0ce1afa to fa19730 Compare December 27, 2024 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant