Skip to content
forked from bellard/quickjs

Public repository of the QuickJS Javascript Engine. Pull requests are not accepted. Use the mailing list to submit patches.

License

Notifications You must be signed in to change notification settings

GerHobbelt/quickjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuickJS Windows Build

Build QuickJS on Windows, and binary releases.

Build Prerequisites

Install MSYS2

Since QuickJS only support 32-bit compiling on Windows at present, we should install i686-toolchain

pacman -S mingw-w64-i686-toolchain

Obtain source code

git clone https://github.com/mengmo/QuickJS-Windows-Build.git

Compilation

cd QuickJS-Windows-Build
make LDFLAGS="-static -s"

Packaging

mkdir ./bin
mv qjs.exe qjsbn.exe qjsc.exe qjsbnc.exe ./bin
mkdir -p ./lib/quickjs
mv libquickjs.a libquickjs.bn.a libquickjs.lto.a libquickjs.bn.lto.a ./lib/quickjs
mkdir -p ./include/quickjs
cp -p quickjs.h quickjs-libc.h ./include/quickjs
zip -9 -r quickjs-$(cat version)-win32.zip ./bin ./doc ./examples ./include ./lib Changelog readme.txt TODO VERSION

Related Projects

quickjs: Thin Python wrapper of https://bellard.org/quickjs/

jsvu: install recent versions of various JavaScript engines without having to compile them from source.


QuickJS Javascript Engine

News

  • 2020-04-12:
    • New release
  • 2020-03-16:
    • New release
  • 2020-01-19:

Introduction

QuickJS is a small and embeddable Javascript engine. It supports the ES2020 specification including modules, asynchronous generators, proxies and BigInt.

It optionally supports mathematical extensions such as big decimal floating point numbers (BigDecimal), big binary floating point numbers (BigFloat) and operator overloading.

Main Features:

  • Small and easily embeddable: just a few C files, no external dependency, 210 KiB of x86 code for a simple hello world program.
  • Fast interpreter with very low startup time: runs the 69000 tests of the ECMAScript Test Suite in about 95 seconds on a single core of a desktop PC. The complete life cycle of a runtime instance completes in less than 300 microseconds.
  • Almost complete ES2020 support including modules, asynchronous generators and full Annex B support (legacy web compatibility).
  • Passes nearly 100% of the ECMAScript Test Suite tests when selecting the ES2020 features.
  • Can compile Javascript sources to executables with no external dependency.
  • Garbage collection using reference counting (to reduce memory usage and have deterministic behavior) with cycle removal.
  • Mathematical extensions: BigDecimal, BigFloat, operator overloading, bigint mode, math mode.
  • Command line interpreter with contextual colorization implemented in Javascript.
  • Small built-in standard library with C library wrappers.

Online Demo

An online demonstration of the QuickJS engine with its mathematical extensions is available at numcalc.com. It was compiled from C to WASM/asm.js with Emscripten.

qjs and qjscalc can be run in JSLinux.

Documentation

QuickJS documentation: HTML version, PDF version.

Specification of the JS Bignum Extensions: HTML version, PDF version.

Download

Sub-projects

QuickJS embeds the following C libraries which can be used in other projects:

  • libregexp: small and fast regexp library fully compliant with the Javascript ES 2019 specification.
  • libunicode: small unicode library supporting case conversion, unicode normalization, unicode script queries, unicode general category queries and all unicode binary properties.
  • libbf: small library implementing arbitrary precision IEEE 754 floating point operations and transcendental functions with exact rounding. It is maintained as a separate project.

Links

Licensing

QuickJS is released under the MIT license.

Unless otherwise specified, the QuickJS sources are copyright Fabrice Bellard and Charlie Gordon.


Fabrice Bellard - https://bellard.org/

About

Public repository of the QuickJS Javascript Engine. Pull requests are not accepted. Use the mailing list to submit patches.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 70.0%
  • JavaScript 27.5%
  • CMake 1.3%
  • Shell 0.4%
  • Makefile 0.4%
  • C++ 0.2%
  • Other 0.2%