benoitc

QuickJS JavaScript engine for Erlang (powered by quickjs-ng). API-compatible replacement for erlang-duktape.

10
0
100% credibility
Found May 04, 2026 at 10 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Erlang
AI Summary

This project embeds a lightweight JavaScript engine into Erlang programs, enabling seamless execution of JS code with data exchange, modules, events, and performance monitoring.

How It Works

1
🔍 Discover the Tool

You need to run JavaScript code inside your Erlang program and find this handy library that makes it simple and safe.

2
📥 Add It Easily

You tell your project to include this library by adding a short line to your setup file, then build your program.

3
🆕 Create a JS Space

You make a fresh, isolated area where JavaScript can run without affecting the rest of your program.

4
Run Your First Code

You give it some JavaScript like '21 * 2' and instantly get back the answer 42, feeling the speed and magic.

5
🔄 Exchange Data

You pass values from your program into JavaScript, run calculations, and bring results back seamlessly.

6
🗣️ Talk Back and Forth

You set up ways for JavaScript to send messages or logs to your program and respond to events in real-time.

🎉 Everything Works Smoothly

Your program now blends JavaScript's flexibility with Erlang's reliability, handling code safely with timeouts and cleanups.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 10 to 10 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is erlang-quickjs?

Erlang-quickjs embeds the QuickJS-NG JavaScript engine into Erlang as a NIF, letting you evaluate JS code, call functions, and pass data bidirectionally between isolated JS contexts and Erlang terms. It's an API-compatible replacement for erlang-duktape, powered by the micro QuickJS GitHub engine with full ES2023 support, CommonJS modules, and no external dependencies. Erlang devs get seamless JS execution in high-concurrency apps without spawning processes.

Why is it gaining traction?

It drops in as a duktape upgrade with modern perks like execution timeouts to kill loops, event bridges for JS-to-Erlang messaging (including console.log forwarding), and registering Erlang functions callable from JS. Benchmarks on M4 Pro show 1.4k ops/sec for evals, thread-safe contexts, memory stats, and manual GC—15-25% behind duktape on latency but ahead on features. The quickjs javascript interpreter's tiny footprint fits Erlang's real-time needs better than bulkier alternatives.

Who should use this?

Erlang backend engineers building rule engines, dynamic config loaders, or plugin systems in telecom, IoT, or fintech apps. Teams migrating from erlang-duktape for ES2023 compliance or needing JS-Erlang callbacks without hacks. Avoid if you need massive JS apps—stick to isolated scripts under 5s timeouts.

Verdict

Solid early docs, benchmarks, and Hex.pm package make it worth a spin for duktape users, but 10 stars and 1.0% credibility signal prototype maturity—expect bugs in edge cases. Test in staging before prod.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.