
Tzvetan Mikov
@tmikov • 6,255 subscribers
Not my employer's opinions. Meta, Static Hermes - a native AOT JS compiler. Co-founded failed https://t.co/GtO5Zl5QKC
Videos

We wanted to show the performance and the insane power of the Static Hermes native FFI. But we don't yet support the all language features needed to compile React Native (soon though!), so we improvised. We imported the bindings for DearImGui (a popular C++ imperative game UI library that renders meshes), and Sokol (an amazing lightweight 3D backend in C) and wrote a small demo. "Imperative UI" means that the entire UI and the state of the screen is recreated on every frame, which suits our purposes to demonstrate SH very well. The demo runs 100% compiled native code. JavaScript runs in every frame and recreates the entire state of the screen. It is portable to all platforms, though the screen layout is not optimized for phone. We wrote the demo in C++ and in JS, to compare, and they both ran with the same performance. In the attached videos you can see the demo running at the stable screen refresh rate - 120Hz on my Mac, 60Hz on a old Moto G5 phone. It includes some widgets, an n-body simulation of planets, a playable game demo, etc.
Tzvetan Mikov826,019 görüntüleme • 2 yıl önce

Introducing proof of concept React Imgui! The name is a joke, but it is accurate enough. In the last few days I have been working on a prototype of React driving Dear ImGui using Static Hermes. The result is a fully native app written almost entirely in JavaScript, using unmodified React, typed JS, plus a very small amount of glue C++ code and unmodified Dear ImGui and Sokol. The actual renderer translating React into Dear ImGui is written entirely in typed JS using zero-cost FFI. Of course this wouldn't be possible without React's great design and flexibility. I find it really fascinating that I was able to take literally unmodified React, write a little extra JS, and get a functional fully native app so quickly. Of course everything is unoptimized, and prototype code quality, and who knows how buggy, but it seems to work well enough. Please, watch the video to see it in action. If there is interest, I will write a more detailed article.
Tzvetan Mikov210,876 görüntüleme • 7 ay önce

Announcing Hermes-node Hermes can now run as a standalone CLI with Node.js-compatible APIs - no C++ embedding required. Technically, hermes-node is a Node.js API compatibility layer for Hermes. It ports Node's native bindings (fs, net, http, child_process, etc.) to Node-API and reuses Node's original lib/*.js files, allowing standard Node.js programs to run on Hermes instead of V8. It vendors libuv, c-ares, llhttp, Ada, simdutf, etc to provide the same networking and I/O stack as Node, and runs as a standalone CLI binary. In this demo: - REPL with tab completion - TypeScript HTTP server using http, fs, and path - Type annotations stripped natively by the parser — no transpiler, not even a built-in one. This is still a work in progress, though surprisingly functional. More Node modules coming, source will be published soon.
Tzvetan Mikov70,701 görüntüleme • 3 ay önce
Daha fazla içerik yok.