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

evaluate SEA for standalone binaries of w3cli by prototyping something with it #176

Open
gobengo opened this issue Feb 15, 2024 · 2 comments

Comments

@gobengo
Copy link
Contributor

gobengo commented Feb 15, 2024

Context

  • SEA is a newish thing in node stdlib that can make executables from a nodejs script https://nodejs.org/api/single-executable-applications.html
  • this used to be something that there were lots of slightly different userspace ways of doing. I've never explored those but iiuc plenty of products use them and they work, I've just never needed them and it wasn't obvious which one to use. So it seems nice to have a blessed way in the nodejs stdlib
  • but the docs say "Stability: 1 - Experimental: This feature is being designed and will change." so it's not obvious whether we can promise a feature powered by this yet.

Potential Benefit

  • if it does work out, we could publish executables of w3cli that would run on systems that don't have node.js installed, which would probably make it easier to use for some and might increase the addressable audience of the w3cli tool

Time box

  • 1 day just to follow the docs on a sample script, see how it goes, debug if needed, report back on how it went. (If it's smooth sailing, go ahead and try it out on w3cli itself and it could work)
@gobengo
Copy link
Contributor Author

gobengo commented Feb 15, 2024

I'm interested in scouting this out but not till landing storacha-network/migrate-to-w3up#3

@olizilla
Copy link
Contributor

I tried SEA before I explored pkg in #104 and it was a non-starter 4 months ago (alas i did not document why!) It's definitely worth another timeboxed try out, and a different set of eyes!

My only flag it that if we end up going the "transpile node.js to single binary" route, the resulting bin has to pass a complete battery of black box tests... porting the existing w3cli test suite as a minimum. My fear is leaning on experimental compilers and having a binary we offer up for production use that fails in deeply surprising ways out in the wild that we can't debug.

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

No branches or pull requests

2 participants