v8的替代方案,用于将C ++对象暴露给JavaScript(在PowerPC上) [英] Alternative to v8 for exposing C++ objects to JavaScript (on PowerPC)

查看:124
本文介绍了v8的替代方案,用于将C ++对象暴露给JavaScript(在PowerPC上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将C ++类(打包为共享库)暴露给JavaScript的魔幻世界.

最明显的解决方案是使用Node.js/v8.问题是它必须在PowerPC上运行(请对此不做任何评论...)并且-las! -v8无法在PowerPC上运行( v8-powerpc 项目似乎已失效)./p>

我正在尝试了解是否还有其他可行的解决方案,目前存在一些可能性:

  1. emscripten ,它将LLVM位代码转换为JavaScript;
  2. WebKit的 JavaScriptCore ,尽管我不确定它是否可以工作(我将拥有WebKit还是在PowerPC上

我不是JavaScript专家,实际上我很失落,所以这是我的问题:

  1. 脚本是有效的解决方案吗? (您曾经使用过它吗?)
  2. 有人能指出我有关如何使用JavaScriptCore将C ++暴露给JavaScript的任何文档吗?
  3. 还有其他选择,和/或您采用哪一个?

非常感谢,

口语

解决方案

Qt具有可在powerpc上运行的webkit端口,并且具有允许您调用C ++代码的JavaScript引擎.

Qt:使应用程序可编写脚本

I need to expose C++ classes (packed as shared libraries) to the magic world of JavaScript.

The most obvious solution is to use Node.js/v8. Problem is that it has to run on PowerPC (please no comments on this...) and - alas! - v8 doesn't run on PowerPC (the v8-powerpc project seems to be dead).

I'm trying to understand if there's any other viable solution, at the moment some possibilities are:

  1. emscripten, which converts LLVM bitcode into JavaScript;
  2. WebKit's JavaScriptCore, although I'm not sure it will work (I'll have WebKit on the PowerPC anyway)

I'm not a JavaScript expert and I actually feel quite lost, so these are my questions:

  1. Is emscripten a valid solution? (have you ever used it?)
  2. Can anyone point me to any documentation on how to expose C++ to JavaScript using JavaScriptCore?
  3. Is there any other option, and/or which one would you adopt?

Many thanks,

Rippel

解决方案

Qt has a port of webkit that runs on powerpc and it has a javascript engine that allows you to call C++ code.

Qt: Making Applications Scriptable

这篇关于v8的替代方案,用于将C ++对象暴露给JavaScript(在PowerPC上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆