mcpp index

compat.quickjs-ng

#include

QuickJS-ng, a small embeddable JavaScript engine (engine only, without quickjs-libc)

#include <quickjs.h>
mcpp add compat.quickjs-ng@0.17.0

用法

来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。

// Behavioral test: JavaScript evaluated by the engine, checked by value.
//
// The package compiles four sources, and each group below needs one of them to
// be present and built with the right flags, so a missing or mis-built TU shows
// up as a wrong answer rather than only as a link error:
//
//   quickjs.c     evaluation, closures, exceptions, the promise job queue
//   dtoa.c        shortest round-trip number formatting (0.1 + 0.2, 5e-324)
//   libregexp.c   named groups, case-insensitive and sticky matching
//   libunicode.c  full case mapping, NFC normalization, script properties
//
// The expected strings are what the ECMAScript specification requires, written
// out by hand; none is computed by the code under test.
//
// The runtime is freed at the end. The package does not define NDEBUG, so
// JS_FreeRuntime asserts that no object is still alive (quickjs.c:2699) and an
// object this test forgot to free aborts it.

#ifdef __linux__

#include <quickjs.h>

// …

tests/examples/quickjs-ng/tests/engine.cpp · 项目 tests/examples/quickjs-ng

构建

targets
quickjs-ng (lib)
language
c++23
C standard
c11
import std
no
include dirs
quickjs-0.17.0/mcpp/include

源文件 (4)

  • */dtoa.c
  • */libregexp.c
  • */libunicode.c
  • */quickjs.c

生成的文件

  • quickjs-0.17.0/mcpp/include/quickjs.h

版本

版本平台 镜像sha256
0.17.0 最新 Linux 源站 559bc4c42047…