Git Product home page Git Product logo

rusalka-vm's Introduction

Rusalka Virtual Machine

The Rusalka VM is a small personal project of mine to implement a fairly simple register-based process virtual machine.

Rusalka is implemented in C++11. Currently, it supports

  • Executing a limited instruction set

  • Loading and executing Rusalka bytecode [1]

  • Importing host functions into the VM

  • Exporting VM functions as callable C++ objects

  • Working with typed values [2]

  • Keeping concurrent threads of execution per VM process [3]

Once the Rusalka language is fleshed out and implemented on top of the Rusalka VM, there will likely be more to say about what it does and does not support, but for now it’s a fairly bare-bones virtual machine. The upside is that it’s fairly easy to produce bytecode for or to compile to Rusalka assembly.

In all likelihood, Rusalka assembly will be abandoned as a core part of the VM, as it’s only in there for testing at the moment and building an assembler into the VM probably isn’t a great use of resources.

Finally, if you want to read a lot of very dry writing about Rusalka’s design and implementation, see my blog post over on Spifftastic: http://spifftastic.net/post/2014/07/on-the-rusalka-virtual-machine/. [4]

Contributing

If you want to contribute to Rusalka’s development, it’s simplest to create a patch and submit it via a pull request on Rusalka’s GitHub repository. Please include a decent explanation of your changes to help folks read them (i.e., walk me through why you made the change, what it does, etc.).

License

The Rusalka VM is licensed under the Boost Software License, Version 1.0. The license can be read in full in the accompanying LICENSE_1_0.txt file or at http://www.boost.org/LICENSE_1_0.txt.


1. Assembled via asm2bc.
2. Specifically uint64_t, int64_t, and double.
3. Not yet thread-safe for the host process.
4. One large difference between the blog post and the current state of Rusalka is that values are no longer strictly 64-bit floats, but are typed as integers, floats, and other data types depending on the value and the result type of an instruction.

rusalka-vm's People

Contributors

nilium avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.