You can run all those languages on top of the JVM!
The JVM also runs many other languages which weren't designed for it, like Ruby and Python.
You can run all those languages on top of the JVM!
The JVM also runs many other languages which weren't designed for it, like Ruby and Python.
That would suggest (again IIUC) Graal/Truffle as a mechanism for using the JVM as a WebAssembly runtime. The WebAssembly format and its associated environment/binding system are a portable way to encode C binaries, with significant benefits over JVM bytecode- that's probably the comparison I should have made.
But I wasn't comparing to WebAssembly, so you'll need to argue that point with someone else.
You could build a WebAssembly interpreter on Truffle, yes. I'm not sure anyone's tried it yet so that project is available.
Do you have a source for this? I'm sure it's theoretically possible in a Turing-completeness sense, but considering Java lacks any concept whatsoever of a pointer, and considering that most (if not effectively all) C code uses pointers pretty extensively, I find it unlikely that this statement is meaningfully true without some severe efficiency penalties.
I use it to run unmodified C extensions for the Ruby programming language on top of the JVM.
Truffle C is another example https://www.manuelrigger.at/downloads/trufflec_thesis.pdf.