avian icon indicating copy to clipboard operation
avian copied to clipboard

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

Open metacritical opened this issue 7 years ago • 1 comments

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.

metacritical avatar Jan 15 '18 06:01 metacritical

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.

dicej avatar Jan 15 '18 23:01 dicej