Skip to content
/ Juse Public

A multi-purpose virtual machine written in C++ (mirror).

License

Notifications You must be signed in to change notification settings

Trehinos/Juse

Repository files navigation

Juse

Juse is a virtual machine which executes bytecode.

It is inspired by projects like :

It could be compared to the JVM or the CLR machines.

The instruction space distribution is inspired by the RISC-V architecture.

© 2022 Sébastien GELDREICH

The goal

Juse is still in early development.
But you can play with it if you are curious.

  • The goal : A multipurpose virtual machine written in modern C++
    • The machine has to be easy to understand (variable 8 bits aligned length opcodes with 16 bits opkey),
    • The project can be used as a framework to create a custom virtual machine with custom opcodes,
  • There are a lot of features todo :
    • OpKeys specification is not fixed,
    • 2 assemblers languages are planned,
    • For now, I stay focused on the C++ code structure : one of the goals of this project is to create a virtual machine which is easy to understand and easy to extend,

This implementation : Uses only std::, uint128_t & SFML (future)

Key features

Implemented features :

  • The machine is composed of Cpus (with Stack and Registers) and the Memory,
  • Cpus can deal with 8, 16, 32 and 64 bits words,
  • The Machine has threadable Cpus (each Cpu has a fixed frequency from 1 Hz to 1 GHz ; 4 KHz by default),
  • 117 operations :
    • std : branching, moves, threads, allocations,
    • ext_u* : general registers manipulation (push/pop/read/write/unsigned arithmetic), integers and strings I/O

Dependencies

Environment

  • Only tested on Windows 11
  • Compiled with Visual C++ 2022

Documentation

Documentation

License

License : MIT
© 2022 Sébastien Geldreich