huxerui.jsruntime
importTSX and QuickJS JavaScript runtime bridge for HuxerUI
import huxerui.jsruntime;
模組名讀自上游 modules/jsruntime.cppm 裡的 `export module` 宣告。
mcpp add huxerui.jsruntime@0.1.1
用法
來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。
// Headless C++23 module consumer test for huxerui.jsruntime.
// Verifies package resolution, embedded QuickJS + TSX runtime.js execution,
// host callbacks, interrupt handling, and diagnostic capture across modules.
import std;
import huxerui.jsruntime;
import huxerui.jsruntime.quickjs;
namespace {
bool Expect(bool condition, std::string_view message) {
if (!condition) {
std::println("FAIL: {}", message);
return false;
}
return true;
}
bool TestQuickJs() {
namespace qjs = huxerui::quickjs;
{
qjs::Runtime rt;
// …
tests/examples/huxerui-jsruntime/tests/jsruntime.cpp · 專案 tests/examples/huxerui-jsruntime
建置 · 上游資訊清單
- modules
huxerui.jsruntime- targets
huxerui_tsx (lib), jsruntime (lib)- language
c++23- manifest version
0.1.1- dependencies
huxerui- 來源
https://raw.githubusercontent.com/HuxerUI/Lib-JSRuntime/v0.1.1/mcpp.toml
版本
| 版本 | 平台 | 鏡像 | sha256 |
|---|---|---|---|
0.1.1 最新 |
LinuxWindowsmacOS | 來源 | eda639d834d2… |