Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Q: Do you have a JavaScript JIT compiler?

> No, we have a traditional AST interpreter that is being replaced by a bytecode VM. You can track the LibJS test262 score for both backends here. I’m not convinced that the complexity and security burdens of a JavaScript JIT are reasonable, and given recent developments like Microsoft Edge’s Super Duper Secure Mode, I’m interested in pushing for best-effort JIT-less performance while keeping the codebase simple.

Always excited to see new JS engines. I'd be curious to see where LibJS's performance / code simplicity / memory balance tends towards over time.



I wonder if a new implementation of JavaScript was needed. My first hunch would have been to try Fabrice Bellard's QuickJS: https://bellard.org/quickjs/


It definitely wasn't needed, but it goes against what I think makes SerenityOS so special.

That being that everything in SerenityOS and its several related projects is made from scratch.


> If you wish to make an apple pie from scratch, you must first invent the universe.

They are using Qt and C++. They have chosen where to draw a line, which is fine, and that line happens to be on the other side of "Javascript Engine".


They are not using Qt in Serenity, only on Linux in order to hook up painting and events.

Also, they are making a new programming language (Jakt) to replace a lot of the C++


To be fair Qt is just to create the window on Linux, but all the browser internals are their own.


It's also being used for networking.


For now…

Everything is from scratch on SerenityOS. Ladybird takes as much of that as it can but the is not afraid to use existing tech for the bits of Serenity that cannot currently be used on Linux ( the GUi framework and networking ).


I think they'll replace Qt with their own GUI lib eventually - and they're already building their own language to replace C++ (for their uses I mean)...


> they're already building their own language to replace C++

Of course, every respectable software project sooner or later invents its own language!


I guess a precise defition of the line would be something like "no third party code dependencies"


Qt is not third party?


for their operating system (serenityOS) they're not using any dependencies, they have their own windowing framework. for the cross platform version of the browser, they use Qt instead. but on serenity itself the browser does not use it.


fair enough


Well... not if you're using KDE as your window manager?


Evidently the line is a curve and did not include a third party JS engine, since the project doesn't include a third party JS engine.


I know. I think you did not understand my comment.


This actually makes a lot of sense, especially when you consider that WASM is now a thing.


It's worth noting, as I'm sure you already noticed, that they are supporting WASM in addition to JS. So maybe the right answer for "your simple, secure bytecode JS interpreter is too slow" really is "Just precompile that slow part to WASM".




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: