mcpp index

huxerui.jsruntime

import

TSX 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…