5 ms·
When I saw the title of this article, I got really excited because I thought they were referring to a lighter "build". IMHO, one of the biggest problems facing
by claytongulick 7y ago
When I saw the title of this article, I got really excited because I thought they were referring to a lighter "build".
IMHO, one of the biggest problems facing v8 right now is the build process. You need to download something like 30 gigs of artifacts, and building on windows is difficult - to say the least.
It's bad enough that the trusted postgres extension plv8 is considering changing it's name to pljs and switching engines to something like QuickJS. [0]
One of the driving factors is that building and distributing v8 as a shared lib as part of a distro is incredibly difficult, and increasing numbers of distros are dropping it. This has downstream effects for anyone (like plv8) that are linking to it.[1]
Also, embedding it is super complex. Referenced in the above conversation is a discussion that NodeJS had to create their own build process for v8. At this point, it's easier to user the NodeJS build process and use the Node v8 API than it is to use v8 directly.
At the beginning of the article, they are talking about building a "v8 light" for embedded application purposes, which was pretty exciting to me, then they diverged and focused on memory optimization that's useful for all v8. This is great work, no doubt, but as the most popular and well tested JavaScript engine, I'd love to see a focus on ease of building and embedding.
0: https://github.com/plv8/plv8/issues/364 https://github.com/plv8/plv8/issues/364
1: https://github.com/plv8/plv8/issues/308#issuecomment-434740000 https://github.com/plv8/plv8/issues/308#issuecomment-4347400...
- vvanders 7y agoMeanwhile integrating Lua is as simple as just dropping in a few c files...
- shakna 7y agoAs is duktape if you for some reason you need it to be JavaScript.
- edoceo 7y agoI thought the word "duktape" was typo+snark. It's not. 100% legit, thanks! https://github.com/svaarala/duktape https://github.com/svaarala/duktape
- shakna 7y agoSorry, I probably should have linked to it. The embedded API is really easy to make use of, and I'd say it's reached production-level stability now. I've only had to use it on tiny hardware though, so your experience may differ.
- peteretep 7y agoduktape has been great for stealing the occasional library to another language when I couldn’t be bothered to properly port it
- veeti 7y agoLua is awful. Even JavaScript is better.
- soylentgraham 7y agoAfter getting frustrated with v8's build process, I tried dropping all the sources (+ pregen files I had generated on osx) into a new visual studio project... Compiled with no problems at all!
- CharlesW 7y ago> At the beginning of the article, they are talking about building a "v8 light" for embedded application purposes, which was pretty exciting to me, then they diverged and focused on memory optimization that's useful for all v8. This is great work, no doubt, but as the most popular and well tested JavaScript engine, I'd love to see a focus on ease of building and embedding. Would you ever consider an engine designed for that, like XS?[1] Or is it V8-or-nothing as far as you're concerned? [1] https://news.ycombinator.com/item?id=16883567 https://news.ycombinator.com/item?id=16883567
- microcolonel 7y agoI don't remember needing to retrieve or build all of chromium in order to work on V8, but maybe I never needed something that you needed.
- snek 7y agoI completely agree that the most difficult part of using V8 is the build process. In node we have three layers (!!!) of build tooling stacked together to insulate ourselves from it (gyp, ninja, and some extra python scripts), and it still requires constant effort to keep working. Deno just gave up and uses GN, but that requires some stupidly complex source layouts and yet more python scripts. Unfortunately, Google just doesn't care about making V8 work with external tooling, it's all about their chromium build process. And this is a real shame, because V8 has the best embedding API of any js engine I know of, it really is a joy to use.