Skip to content

Integrate pkg for creating release executables#99

Open
sangaline wants to merge 13 commits intomainfrom
ews-integrate-pkg
Open

Integrate pkg for creating release executables#99
sangaline wants to merge 13 commits intomainfrom
ews-integrate-pkg

Conversation

@sangaline
Copy link
Contributor

@sangaline sangaline commented Mar 25, 2024

This integrates Vercel's Pkg tool into the project for building single file executables of the CLI for distribution. There are arm and x86 builds for linux, macos, and windows now, the six builds are automatically uploaded as artifacts on every github release. I made a release off this branch to test this: https://github.com/Sindri-Labs/sindri-js/releases/tag/v0.0.1-alpha.44

Overall, I'm not that thrilled with Pkg, but it was the first tool I was able to get working reliably with the cross-platform builds and it seems like it's still the most popular choice for now. It's unmaintained, it has a number of bugs around filesystem access (e.g. fs.promises.access doesn't work), it doesn't support ESM, and it seems to break with dual ESM/CJS modules. Some alternatives we might want to try in the future:

  • nexe - Seems like a pretty solid alternative, I'm guessing this is where most of the Pkg community moves now that it's unmaintained.
  • node single executable applications - This is probably the best thing long-term, but it's still very experimental and the ergonomics are very rough.

Copy link
Contributor

@jason-sindri jason-sindri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

2 participants