适用于 ANSI C 的嵌入式 VM 运行时
我正在寻找可嵌入任何 ANSI C 代码的虚拟机运行时环境。
我为函数式语言设计了一种语法,它看起来很像 CoffeeScript 的精简版本。现在我想为这种语言编写一个编译器,但我不知道应该选择什么虚拟机。
我的语言的关键功能是支持闭包,当然还有健全的 GC。它应该相当小。
我一直在几个项目中使用 Lua,并且正在研究 Lua 5.1 VM。然而,它似乎与我的语言不会使用的 Luas 表概念紧密结合。
有什么建议吗?
I'm looking for a Virtual Machine runtime environment that is embeddable in any ANSI C code.
I have designed a syntax for a functional language that looks a lot like a stripped version of CoffeeScript. Now I want to write a compiler for this language, but I don't have know what VM I should go for.
The key function for my language is support for closures and of course a sane GC. It should be fairly small.
I have been working with Lua in a couple of projects and I'm investigating the Lua 5.1 VM. However, it seems to be tightly coupled with Luas concept of tables which my language wouldn't utilize.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
还有 Neko VM。
There's also the Neko VM.
你看过鹦鹉吗?
http://www.parrot.org/
Have you looked at Parrot?
http://www.parrot.org/
另一个选择可能是 TinyVM,它非常小,而且它的代码库非常干净。原始项目还有一个可以提高性能的分叉分支:FastVM。就其尺寸而言,两者都非常强大,并且可以轻松扩展以最适合您的需求。
希望这有帮助! :)
Another option might be TinyVM which is very small, and it's codebase is surprisingly clean. The original project also has a forked branch that improves on performance: FastVM. Both are pretty powerful for their size, and could easily be extended to best fit your needs.
Hope this helps! :)
除了许多其他替代方案之外,请查看 squirrel 编程语言及其 VM。
Besides many other alternatives, have a look at the squirrel progamming language and its VM.