Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
LibJS JavaScript Engine (libjs.dev)
57 points by webmaven on March 30, 2022 | hide | past | favorite | 18 comments


This would be a better link: https://github.com/SerenityOS/serenity/tree/master/Userland/...

OP links to a not quite informative web site.


That's not much better to be honest. No readme.


True. Looks to be a little tightly coupled to the OS for the moment.


If you want to see some good videos of Linus Groh developing libJS, check out his YouTube channel: https://www.youtube.com/linusgroh

Also, SerenityOS's creator has a great channel: https://www.youtube.com/c/andreaskling


I, too, enjoy Linus's YouTube channel! :^)

His meticulous approach of implementing specifications by writing code interleaved with quotes from the spec has inspired me to adopt the same style.


What is the draw here compared to other JS engines (either v8/JSC/spidermonkey on the big end or something like quickJS/duktape on the small end)?


All those other engines are cross-platform, whereas LibJS is UNIX only and actually very dependent on SerenityOS libraries (so not really a portable UNIX library), but that's apparently the intended design.


To be fair both JavaScriptCore and V8 heavily rely on the base C++ libraries that are part of Chromium and Webkit.


You can totally build and use V8 independently (many projects, including node.js, do it) and they have documentation specifically targeted at embedders.

JSC is not as nice but can still be built and embedded as a stand-alone library.


Yes but in doing so you will also build the supporting C++ library. I imagine it would be relatively easy to do the same for the serenity javascript engine / browser. The serenity standard library https://github.com/SerenityOS/serenity/blob/master/Meta/Lago... has support for other platforms.


It would be nice if LibJS would become an independent library, but last time I checked it had way too many dependencies on other core / helper libraries in SerenityOS for it to be ripped out; not sure why it would need a separate website unless making it independent is in the plans.


Being closely integrated with the rest of the system & libraries is a feature, not a bug - no plans to change anything about it :^) That being said, it's definitely possible to use it outside of SerenityOS as a regular library, just need a checkout of the serenity source for that. See https://github.com/linusg/libjs-test262 for an example, specifically the CMake files and `src/main.cpp`.

The separate website is just to have a nice & short link to the test262 graph and whatever else we'll put there eventually; and also because it's built/deployed in a slightly different way than the main serenityos.org website.


Will LibWeb get its own site too?


"Maybe. Maybe not. There is no plan." [1]

Perhaps for WPT results, once we capture those regularly.

[1]: https://github.com/SerenityOS/serenity/blob/master/Documenta...


Related ongoing thread:

SerenityOS Browser now passes the Acid3 test - https://news.ycombinator.com/item?id=30853392 - March 2022 (44 comments)


Oh for fucks sake people. There seems to be 5 lines of text on that page and to see them I needed to turn off content blockers. Jeez…


It's your "content blocker" that's broken if it's blocking random stuff. It's a very simple website without weird things.


Use a browser that let's you disable JS by default and whitelist websites where you have no choice.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: