Yavashark is a small, embeddable JavaScript engine written in Rust, developed by one person every day for 950 days as a side project. After more than 4,200 commits, it passes about 82% of the JavaScript test262 conformance suite and supports Temporal and Intl. Its command-line tool can run TypeScript and React, including the React and React DOM libraries, and a browser playground lets people try it. The engine is designed to be easy to extend: Rust functions and methods can be exposed to JavaScript with a macro, while experimental APIs provide limited filesystem, I/O, TCP, HTTP, and timer capabilities. The author emphasizes that the project remains incomplete and currently relies mostly on a tree-walking interpreter, with async/await bytecode support; it lacks major performance techniques such as hidden classes, inline caches, NaN-boxing, and efficient object layouts.
Planned work includes a concurrent, moving, generational garbage collector, NaN-boxing, optimized object representation, and new bytecode with inline caches and cheaper dispatch. An early prototype of the interpreter, using the proposed collector, averaged 3.5 times the speed of V8’s jitless mode across 19 microbenchmarks and won each one; it also beat JIT-enabled V8 in a few cases. These results are preliminary, and integrating the prototype into the full engine may reduce its gains. The project is presented as an ongoing experiment rather than a near-term V8 competitor. Its creator, who is under 20, has also joined Ecma’s TC39 as an invited expert and welcomes community contributions and support.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.