Skip to content

Package standalone binaries via @vercel/pkg - #343

Open
Paul Taylor (trxcllnt) wants to merge 40 commits into
devcontainers:mainfrom
trxcllnt:fea/pkg
Open

Package standalone binaries via @vercel/pkg#343
Paul Taylor (trxcllnt) wants to merge 40 commits into
devcontainers:mainfrom
trxcllnt:fea/pkg

Conversation

@trxcllnt

@trxcllntPaul Taylor (trxcllnt) commented Dec 23, 2022

Copy link
Copy Markdown
Contributor

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

@IgnisDa

Copy link
Copy Markdown

Paul Taylor (@trxcllnt) Any updates on this?

@trxcllnt

Copy link
Copy Markdown
ContributorAuthor

Diptesh (@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
Copy Markdown
ContributorAuthor

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

@IgnisDa

Copy link
Copy Markdown

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

@Roemer

Copy link
Copy Markdown

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

@nbrinks

Copy link
Copy Markdown

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

@Roemer

Copy link
Copy Markdown

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 freeto 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

@trxcllnt@IgnisDa@jkeech@Roemer@nbrinks@chrmarti@bamurtaugh@joshspicer