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

Package standalone binaries via @vercel/pkg #343

Open
wants to merge 40 commits into
base: main
Choose a base branch
from

Conversation

trxcllnt
Copy link
Contributor

@trxcllnt trxcllnt commented Dec 23, 2022

This PR is an attempt to address #7 (comment).

Publishing a standalone devcontainer binary that can be installed into images/machines w/o node would be super helpful.

pkg can't statically analyze dynamic require calls, so I use static node-pty requires when bundling for use w/ pkg. pkg warns about other dynamic requires (seemingly from yargs), so we should validate these aren't executed at runtime.

  • Add a package-standalone npm script to create standalone [win, linux] x [amd64, arm64] binaries
  • Update the CLI unit tests to invoke either the npm-pack'd package or the standalone binary
  • Update the GitHub action workflows to build, upload, and test the standalone binaries
  • Passes linux-x64 and win-x64 tests 🎉

I have a separate branch that adds macOS binaries and updates the GHA workflows to build/test/publish them. I've held off merging it into this PR because it's a huge change to dev-containers.yml and publish-dev-containers.yml, but I can if folks are comfortable reviewing it all together.

edit: I've updated the release action to create GH releases w/ the new artifacts (see this sample release).

edit 2: I've opened a draft PR with the workflow changes in #385

@trxcllnt trxcllnt requested a review from a team as a code owner December 23, 2022 02:37
@trxcllnt trxcllnt force-pushed the fea/pkg branch 5 times, most recently from 161ec7b to 4e92744 Compare January 3, 2023 23:54
@IgnisDa
Copy link

IgnisDa commented Jan 10, 2023

@trxcllnt Any updates on this?

@trxcllnt
Copy link
Contributor Author

@IgnisDa From my perspective this PR is complete (especially if the maintainers are comfortable w/ merging in the additional workflow changes in this branch). I'm just waiting on maintainer reviews/approval to run the CI jobs.

@trxcllnt
Copy link
Contributor Author

@IgnisDa I don't know the right people to @ for attention, but feel free to comment if you do.

@IgnisDa
Copy link

IgnisDa commented Jan 10, 2023

Unfortunately, neither do I, but thanks for your work!

@bamurtaugh bamurtaugh added this to the April 2023 milestone Mar 23, 2023
@bamurtaugh bamurtaugh modified the milestones: April 2023, May 2023 Apr 25, 2023
@bamurtaugh bamurtaugh modified the milestones: May 2023, Backlog, June 2023 Jun 1, 2023
@Roemer
Copy link

Roemer commented Jul 11, 2024

Any news here? This would still be very very useful in many cases.

@nbrinks
Copy link

nbrinks commented Oct 10, 2024

Very interested in an official standalone binary. Also, noticed the vercel/pkg repo was archived back in January of 2024.

@Roemer
Copy link

Roemer commented Oct 10, 2024

I thought about starting to port the CLI to golang to make it rather easy to have a standalone binary (even static linked) for all systems available. I am familiar with golang enough but lack some time to do it all by myself. I could setup the repo and create the initial structure and cli application with some very basic functionaliy and if some people would join, I guess we would have something available fairly quickly.

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.

8 participants