quickjs
Duktape
quickjs | Duktape | |
---|---|---|
72 | 10 | |
8,700 | 5,978 | |
- | - | |
8.8 | 6.4 | |
5 months ago | 10 months ago | |
C | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
quickjs
-
Building Static HTML Pages with JSX Server-Side Rendering
Built on a highly optimized JavaScript runtime powered by QuickJS, Query offers fast startup times and efficient execution. Its built-in caching mechanism further enhances performance by storing function responses, reducing database load and latency. This focus on speed makes Query a standout choice for server-side rendering, especially in applications with many components.
- Lua Is So Underrated
-
Introducing our Next-Generation JavaScript SDK
Where the previous SDK was built on top of the QuickJS JavaScript engine and the Javy runtime, the new SDK is built on top of the Firefox browser’s SpiderMonkey engine, and the Bytecode Alliance’s StarlingMonkey runtime and ComponentizeJS WIT bindings generator.
- QuickJS JavaScript Engine
-
QuickJS: Handle Typescript Sourcemap
I'm currently using Bellard's QuickJS engine on a new TypeScript project.
- [Lab] AWS Lambda LLRT vs Node.js
-
What Is in a Rust Allocator?
You may be familiar, but I just wanted to show how it is available in many C implementations and is used, for example, in QuickJS: https://github.com/bellard/quickjs/blob/0c8fecab2392387d76a4...
-
Show HN: Happy Pi day with this PWA to cut 100k Pi digits offline
It uses service workers to cache static files, by the time it opens up you already free to be offline, try toggle network switch to verify.
It has download link at bottom of the about page ([accdoo.app/about]) which you could then self host it by dropping into any static hosting services.
btw, the Pi feature was by-product from the original App but I won't expand here, if you'd like to learn more, please checkout its two Show HN post (39115559 and 39138957) previously.
[wiki]: https://en.wikipedia.org/wiki/Chudnovsky_algorithm
[quickjs/pi]: https://bellard.org/quickjs/pi.html
[pi_bigint.js]: https://github.com/bellard/quickjs/blob/master/examples/pi_b...
[accdoo.app/about]: https://accdoo.app/about#releases
[39115559]: https://news.ycombinator.com/item?id=39115559
[39138957]: https://news.ycombinator.com/item?id=39138957
-
Ask HN: C/C++ plugin make JavaScipt end up with C/C++ binary?
Just go with quickjs, I think this is what you are looking for.
https://bellard.org/quickjs/
- Show HW: accdoo cipher web app now fused with offline Pi cutter (100k digits)
Duktape
- Roll your own JavaScript runtime, pt. 3
-
How to Create a Modern C Project with CMake and Conan
Im my projects I search for single file libs.(like https://github.com/svaarala/duktape etc...)
-
Is there anyway to bypass the limit of rand()?
Use lrand48(), or better, implement a high-quality RNG like PCG or splitmix64.
-
Libgrapheme: A simple freestanding C99 library for Unicode
You can also refer to the Unicode routines of other small JS engines[1,2], those don’t use ICU either, although the implementations are mercilessly size-optimized (to put it politely) and restricted to what the target JS version requires (e.g. casemapping but no normalization).
[1] https://github.com/bellard/quickjs/blob/master/libunicode.c
[2] https://github.com/svaarala/duktape/blob/master/src-input/du...
- Duktape
- Nan Boxing
-
YouTube-dl has a JavaScript interpreter written in 870 lines of Python
I was expecting this to be about Duktape <https://github.com/svaarala/duktape>, but heh, for sure no. I'd bet $1 there's no way youtube-dl would switch, but I wonder if yt-dlp would?
-
Optimizations Enabled by -ffast-Math
Fast math optimizations can break code like this by breaking isNaN.
I was porting a C++ project to a certain platform - and that platform enabled a -ffast-math equivalent by default in Release (but not Debug) builds! This broke duktape, a JS engine said project embedded, in some nasty and subtle ways. Instead of storing a number/pointer/??? (8 bytes) + type tag (4? bytes) for each dynamically typed JS value, duktape can bit-pack values into a single 8 byte "double" value by storing object/string handles as NaN values - this isn't an uncommon trick for dynamically typed scripting stuff:
https://github.com/svaarala/duktape/blob/c3722054ea4a4e50f48...
Naturally, the -ffast-math equivalent broke isNaN checks, which caused random object/string handles to be mistakenly reinterpreted as "numbers" - but only in Release builds, for this one particular platform, in one rarely taken branch, so neither QA nor CI caught it, leading to hours of manufacturing a repro case, stepping through an absurd amount of code, and then finally looking at the default build rules and facepalming.
Cursing the platform vendor under my breath, I overrode the defaults to align with the defaults of every other config x platform combination we already had: no fast math. If you want those optimizations, use SSE-friendly NaN-avoiding intrinsics - or, if you must use the compiler flags, ensure you do so consistently across build configs and platforms, perhaps limited to a few TUs or modules if possible. This allows you to have a chance at using your Debug builds to debug the resulting "optimizations".
-
Can C++ and JS be used together?
Sure. For example, DukTape is an implementation of Javascript designed to be embedded in other projects. Google's V8 Javascript engine (used in Chrome), can also be embedded, see Node.Js for example.
-
[AskJS] Do you use JavaScript on Microcontrollers? Which engine / interpreter?
- Duktape (4.8k stars)
What are some alternatives?
jerryscript - Ultra-lightweight JavaScript engine for the Internet of Things.
V8 - The official mirror of the V8 Git repository
mjs - Embedded JavaScript engine for C/C++
Lua - Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.
edex-ui - A cross-platform, customizable science fiction terminal emulator with advanced monitoring & touchscreen support.
esp8266-quickjs - An attempt on getting QuickJS working on ESP8266 hardware
V7 - Embedded JavaScript engine for C/C++
Nuitka - Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4-3.13. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.
ChaiScript - Embedded Scripting Language Designed for C++
react-native-desktop-qt - A Desktop port of React Native, driven by Qt, forked from Canonical
ChakraCore - ChakraCore is an open source Javascript engine with a C API. [Moved to: https://github.com/chakra-core/ChakraCore]