开源虚拟机

发布于 2024-09-14 21:32:41 字数 199 浏览 2 评论 0原文

我正在寻找一个开源虚拟机,它具有:

  • 快速尽可能轻量级
  • 支持最小的字节码集(如 LLVM IR),
  • 可以轻松地从 C++ 应用程序
  • 嵌入平台(Linux、Windows 和 OS X)
  • x86 支持

I'm looking for an open source virtual machine that's:

  • fast and as lightweight as possible
  • supports a minimal set of bytecode (like LLVM IR)
  • easily embedable from a C++ application
  • Cross platform (Linux, Windows and OS X)
  • x86 support

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

愁以何悠 2024-09-21 21:32:41

Lua 因其极其容易嵌入到 C/C++ 中而闻名。它的VM是开源且跨平台的,非常小(exe大小和字节码指令集),同时速度相当快。但它的字节码可能不适合您的语言。 字节码格式记录在此处。

Lua is famous for being ridiculously easy to embed in C/C++. Its VM is open source and cross-platform, very small (both exe size and bytecode instruction set) and at the same time quite fast. But its bytecode may be not suitable for your language. The bytecode format is documented here.

小糖芽 2024-09-21 21:32:41

NekoVM 是一种编程语言和轻量级虚拟机,设计为编译器编写者的通用目标。 文档使得将VM嵌入到C或C++应用程序中看起来非常容易,但VM似乎API 尚未记录。

NekoVM is a programming language and a lightweight virtual machine designed as a generic target for compiler writers. The documentation makes it seem really easy to embed the VM in a C or C++ application, but it seems the VM API is not yet documented.

柠北森屋 2024-09-21 21:32:41

为什么要过滤掉 LLVM ?它是一组C库

我想它不像Lua那么容易嵌入,但是LLVM 是如此出色,以至于它可能会克服集成它的麻烦。请参阅这个问题,有帮助吗?

Why filter out LLVM ? It's a set of C libraries

I guess it's not as easy to embed than Lua, but LLVM is so great that it would probably overcome the hassle of integrating it. See this SO question, does it help ?

伴梦长久 2024-09-21 21:32:41

其他可能的答案:为什么不输出汇编程序呢?它快速且轻量级,而且您根本不需要虚拟机。由于您仅针对 x86,因此这可能是有意义的,具体取决于您想要做什么。

Other possible answer : why not output assembler instead ? it's fast and lightweight, and you don't need a VM at all. Since you target x86 only, it could make sense, depending on what you're trying to do.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文