ReadyTalk / avian

[INACTIVE] Avian is a lightweight virtual machine and class library designed to provide a useful subset of Java's features, suitable for building self-contained applications.
https://readytalk.github.io/avian/
Other
1.22k stars 173 forks source link

Is it possible to embed Avian in C/C++ ? #553

Open metacritical opened 6 years ago

metacritical commented 6 years ago

Hi i writing a small test kernel for fun and the idea was to write write a small C++ entry from assembly that embeds the Avian JVM when the kernel is in 32 bit mode. From there on develop the entire experimental OS on Java or Compile to JVM Byte code languages like Scala/Clojure etc. So really what i would like to know is how do i embed the thing in a C/C++ kernel.

dicej commented 6 years ago

Hi. In theory, yes, you could do that. However, Avian relies on an OS to provide certain functionality such as memory management, signal handling, threading, filesystem access, networking, etc.. And in order to make e.g. Scala or Clojure work, you'll need to use the OpenJDK class library, which has a lot more OS dependencies.

Take a look at the files in https://github.com/ReadyTalk/avian/tree/master/include/avian/system to see what the Avian VM needs from the OS.