3 ms·
What does this offer as an alternative to node? I’m looking at the supported platforms page and the list is essentially the same as the node ones… does it have
by freeone3000 2y ago
What does this offer as an alternative to node? I’m looking at the supported platforms page and the list is essentially the same as the node ones… does it have a wasm target? An embedded target? What’s new here?
- noddingham 2y agoMy first thought was maybe they are following the advice of instead of creating something new, just clone something successful and riff on it. As you pointed out it's hard to determine why Bare other than it isn't Node.
- mjgoeke 2y agoMobile? afaik node.js doesn't run on mobile. If that's the case the 'copy' doesn't do a good job of highlighting the big value prop.
- SahAssar 2y agoThere is nothing stopping node from running on mobile and IIRC quite a few apps embed it as a part of electron or similar frameworks. If i understand correctly bare can instead use much smaller engines like quickjs (and maybe libjs), but I'm not sure how the stdlib situation is for those.
- kasperisager 2y agoBare supports both QuickJS (https://github.com/holepunchto/libqjs https://github.com/holepunchto/libqjs) and JerryScript (https://github.com/holepunchto/libjerry https://github.com/holepunchto/libjerry), yes, allowing it to run on much more constrained devices than what Node.js is capable of. I'm running it on my MediaTek-based LTE router, for example, using JerryScript.
- maxloh 2y agoFrom their README [1]: Bare itself only adds a few missing pieces on top to support a wider ecosystem of modules: 1. A module system supporting both CJS and ESM with bidirectional interoperability between the two. 2. A native addon system supporting both statically and dynamically linked addons. 3. Light-weight thread support with synchronous joins and shared array buffer support. Everything else if left to userland modules to implement using these primitives, keeping the runtime itself succinct and bare. [1]: https://github.com/holepunchto/bare#architecture https://github.com/holepunchto/bare#architecture