Skip navigation
Announcing Hermes-node
0:00 / 2:43

Announcing Hermes-node

Tzvetan Mikov

@tmikov6.7K followers

Visit on X
503 likesDownloadOriginal post

78,836 views

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.

42 Comments

Comments from the original post on X (Twitter)

  • Jarred Sumner's profile picture

    @jarredsumner

    very impressive Did you do this via implementing v8’s C++ API similar to node-jsc?

    49 likes

  • Tzvetan Mikov's profile picture

    @tmikov

    My goal wasn't to drop-in replace v8 in Node, so I went in the opposite direction. I am porting and partially re-implementing Node C++ bindings. So, instead of putting Hermes in Node, I am adding Node modules to Hermes, so to speak. This gives me better control over the architecture and more "ownership" over the result. I am pretty excited about adding sound typing to the Node modules and compiling them natively. End result is potentially almost everything written in typed JS, with very little C++.

    73 likes

  • Dave Choi's profile picture

    @jsoneaday

    @jarredsumner What is the perf impact of using modules to interface. Any penalty

  • Tzvetan Mikov's profile picture

    @tmikov

    @jarredsumner Sorry, I don't understand the question. Can you elaborate?

  • Dave Choi's profile picture

    @jsoneaday

    @jarredsumner I was just asking if there is a performance penalty to doing it with modules instead of swapping out chrome for hermes

  • Tzvetan Mikov's profile picture

    @tmikov

    @jarredsumner What do you mean by "modules"?

    1 like

  • Dave Choi's profile picture

    @jsoneaday

    @jarredsumner You said you’re “adding node modules to hermes”. So I’m asking any perf penalty in doing that as opposed to switching chrome to hermes

  • Tzvetan Mikov's profile picture

    @tmikov

    @jarredsumner It is hard to say - can't compare performance against a hypothetical. Switching Node to Hermes requires shimming the v8 API, which I haven't looked into.

  • Guillermo Rauch's profile picture

    @rauchg

    Cool

    18 likes

  • Jamie Birch's profile picture

    @birch_js

    Really exciting. In Vladimir's PR to add Node-API support to Hermes, we needed a way to run unit tests from the Node.js repo on Hermes. Vladimir ended up writing a "lite" Hermes Node.js for that (and I contributed child process support for POSIX!). Asking what this means for us.

    16 likes

  • Marc's profile picture

    @mrousavy

    this is amazing

    13 likes

  • Albert Gao's profile picture

    @albertgao

    Wait, so, a smaller Electron?😍

    5 likes

  • Roman D's profile picture

    @romanonthego

    Ability to run tests and benchmarks in Hermes directly will be a killer feature.

    4 likes

  • Florian's profile picture

    @FlorianCaesar

    I’ve been waiting for something like this. Will this also work with static Hermes somehow? I.e. can we AOT compile Node.js bindings? (Are they even well typed enough?) Also curious what’s the Meta use case for this..? Or is it more of an open ended exploration / Hermes extension

    2 likes

  • Tzvetan Mikov's profile picture

    @tmikov

    I developed it in my free time. Yes, compiling typed .js is very much part of the plan.

    21 likes

  • kv's profile picture

    @kapv89

    int32, int64, float32, float64, shared memory multithreading, static memory layout objects. Small list left for the greatest lang ever.

    1 like

  • Ritesh Shukla's profile picture

    @RiteshRk14

    Amazing 🧐

    1 like

  • Cal Lavicka's profile picture

    @CalLavicka

    Nice, been wanting this for a while - excited to see where you take it

    1 like

  • Asko's profile picture

    @asko_9505

    Super excited about this! 🚀 Been following your work on Hermes & Static Hermes for a while coming from Meta and leading the engine that powers React Native, you know exactly what’s missing in the JS runtime space. hermes-node feels like the perfect bridge: fast startup, tiny footprint, native TS support, and real Node compatibility. This has huge potential for CLI tools, edge/serverless, scripts, and even pushing performance further with Static Hermes later. Extremely bullish on this project. Can’t wait to see where it goes and to play with the source. Great work Tzvetan!

    1 like

  • Maciej Jastrzębski's profile picture

    @mdj_dev

    @tmikov is there any source or binary to try? 🤩

    1 like