Question

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?

Was it helpful?

Solution

Have you looked at Parrot?

http://www.parrot.org/

OTHER TIPS

There's also the Neko VM.

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! :)

Besides many other alternatives, have a look at the squirrel progamming language and its VM.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top