News for hackers. Stuff that matters.
Re:Cervus: A WebAssembly subsystem for Linux by jchw on Wednesday May 30, 2018 @01:16AM (#17185250)
Having web assembly be a native subsystem... That's brilliant. Why has this not been attempted for Java or anything else for that matter? I guess you could count Microsoft's .NET implementation.

In any case, you could extend this beyond just user mode. Currently the domain of safe ring0 execution is eBPF as far as I know, but this would be way more approachable and other operating systems could implement it.

I've got no idea what the future is for this project but I really hope it doesn't stay in the realm of "fascinating but not practical."

Re:Cervus: A WebAssembly subsystem for Linux by masklinn on Wednesday May 30, 2018 @06:43AM (#17186554)
> Having web assembly be a native subsystem... That's brilliant. Why has this not been attempted for Java or anything else for that matter?

There have been CPUs which could execute Java bytecode directly…

And not just actual Java processors, ARM has/had an extension for that: https://en.wikipedia.org/wiki/Jazelle

Re:Cervus: A WebAssembly subsystem for Linux by jchw on Wednesday May 30, 2018 @09:06AM (#17187339)
I was aware of the Java CPUs, but somehow that seems less interesting. Maybe because at that point, it's not so different from any other CPU architecture.
Re:Cervus: A WebAssembly subsystem for Linux by pjmlp on Wednesday May 30, 2018 @01:45AM (#17185371)
It has.

I remember there was Linux Journal article about it, almost 20 years ago, regarding Java.

Also this is how mainframes like IBM i work. Binaries use the TIMI format and are JITed into native code at installation time or on demand, if needed.

Re:Cervus: A WebAssembly subsystem for Linux by jacobush on Wednesday May 30, 2018 @08:43AM (#17187195)
A lot was going on with Java in the early days. On the one hand, SUN resisted it, back when Java was not open source, then open source but with a heavy hand on it.

On the other RM Stallman also resisted everything Java, because it did not mesh with his vision of the future. (Prop up everything GPL, unless the proprietary solution is already an industry standard.) My favourite example was how GCC was on the cusp of getting a backend which could emit Java byte code. Imagine that!

That could have kickstarted all the JVM languages a decade earlier. Alas, many forces were against such things.

Now, we have everything on everything, but most of all Javascript everywhere. Weird. :-)

Re:Cervus: A WebAssembly subsystem for Linux by fnord123 on Wednesday May 30, 2018 @02:37PM (#17190323)
You can write kernel modules for netbsd in lua.

http://mail-index.netbsd.org/source-changes/2013/10/16/msg04...

Re:Cervus: A WebAssembly subsystem for Linux by izacus on Wednesday May 30, 2018 @05:05AM (#17186197)
Isn't that what JVM actually is? Java subsystem for Linux/et. al?
Re:Cervus: A WebAssembly subsystem for Linux by sanxiyn on Wednesday May 30, 2018 @05:42AM (#17186344)
No, JVM makes syscalls to Linux. This makes calls, not syscalls, to Linux. There is no context switching.