26 ms·
I think these are good questions, and I agree with them regarding the downsides of binaries. I do think there’s an interesting path here though, and that’s wri
by steveklabnik 8y ago
I think these are good questions, and I agree with them regarding the downsides of binaries.
I do think there’s an interesting path here though, and that’s writing said tooling in a language like Rust, but distributing it in an npm package and have it pre-compiled as webassembly. It still feels native to JS people, you don’t have to deal with cross-platform issues, but you gain static typing and speed. There are other aspects of it too, like more consistent performance, and lower memory usage...
Interesting times!
- Klathmon 8y agoAnd that's why I tried to avoid saying it's a bad idea in general. I'd love to see more diversity in languages on NPM. Things written in Go but compiled and distributed as binaries over NPM (maybe with a small JS wrapper), or things written in Rust but compiled to wasm and distributed over NPM. If the compilers in those other languages get a bit better at outputting WASM or JS, we get closer to the idea of being able to really use the best language/tool for the job, then cobble them all together near the end to make one truly great product where each part is written in a language which is best suited to the sub-task it's doing!
- tracker1 8y agoAgreed on WebAssembly... I'm thinking/hoping that a number of binary packages will be migrated to, or at least tested via webassembly. There are some modules in C that are impossible via webassembly, but a great number of them are. Having the wasm versions in npm could be really useful.