tinylibs / tinyexec

📟 A tiny, higher level interface around child_process
MIT License
100 stars 1 forks source link

comparison to execa? #18

Closed mmkal closed 1 week ago

mmkal commented 1 month ago

Hi - this library looks great and am a fan of all the tinylibs. Ur as a pretty happy user of execa, it would be good to see a comparison vs the usual other options like execa - both the performance gains/losses (using tiny bench?) but also the tradeoffs, like the presumably smaller API surface. Was there something specific that motivated creating this, etc.?

43081j commented 1 month ago

The primary reason is that execa and other popular alternatives are rather large (install size, complexity). So tinyexec exists to provide at least the main functionality but much lighter and more focused

You are probably right that we should explain this in the readme

ehmicky commented 3 weeks ago

I think a good starting point would be to look at the following list of Execa features, which explains the repository size. If you work with spawning commands, there are many of those features that will probably benefit you. But I'm biased, since I co-maintain Execa :)

43081j commented 2 weeks ago

indeed, much of the feature list of execa won't ever be replicated here since it is extra, higher level stuff that many consumers don't need (which is where something like tinyexec comes in useful)

i don't think we should list features of other alternatives as a comparison, though. a brief mention of them might make sense but the comparison should really just list the core differences

i'll have a go at writing something up this week 👍

ehmicky commented 2 weeks ago

indeed, much of the feature list of execa won't ever be replicated here since it is extra, higher level stuff that many consumers don't need

I wouldn't speak on users behalf. Execa is used by millions of repositories. From interacting with users over many years, I can confirm they are not only using the core features, but also the extra stuff. Some of it is very useful, if not critical (especially security, cross-platform support, and debugging).

Instead of reading any biased comparison, I would advice any user to make their own opinion by quickly browsing the documentation of each project, and see which works for them.

43081j commented 2 weeks ago

Security and cross platform isn't a great example since both libraries will succeed in those areas (and probably already have)

The remaining features are the ones that will decide if someone uses one or the other, really. For those, we can briefly mention the core differences and the level this library is aiming for (which is lower than that of execa, i.e a thinner layer on top of node).

For any additional info, users will be able to find the relevant docs etc to do their own research

Just back to the OP, we should add a brief overview of why you might choose this library over other alternatives. I can have a go at writing that up while I'm around this week

mmkal commented 2 weeks ago

As the OP I would find a "biased" comparison much more useful than having to do it myself, which requires a lot of research in an area I'm not deeply familiar with, unlike the authors of the two libraries. I am capable of taking into account potential bias, and hopeful that the authors of each can be honest about the tradeoffs - and failing that, when there are specific claims, them being written out clearly makes them easier to question and/or justify.

mmkal commented 1 week ago

I'm closing this as resolved by https://github.com/tinylibs/tinyexec/pull/31

Feel free to reopen if you wanted to keep it around for some reason though.