compat.quickjs-ng
#includeQuickJS-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… |