News for hackers. Stuff that matters.
Re:WebAssembly Interface Types: Interoperate with All the Th... by chrisseaton on Wednesday August 21, 2019 @05:26PM (#20762006)
> Graal does not have a standard binary interchange format for compiled C/Rust/etc.-style programs

It does - LLVM bitcode.

Re:WebAssembly Interface Types: Interoperate with All the Th... by Rusky on Wednesday August 21, 2019 @05:34PM (#20762084)
LLVM bitcode is far worse than WASM bytecode as a standard binary interchange format. It is intentionally non-portable and unstable by its designers.

Google tried using it for this purpose with PNaCl and it wasn't great. Apple makes it work by strictly controlling the target hardware they use it for, and with massive investment in the toolchain.

Re:WebAssembly Interface Types: Interoperate with All the Th... by repolfx on Thursday August 22, 2019 @05:00AM (#20766041)
That's more a criticism of C rather than LLVM. Bitcode isn't as portable or stable as JVM bytecode because real world C programs use processor specific intrinsics, make assumptions about endianness and word sizes, embed assembly etc etc. LLVM is designed to support all real C programs, which means it can't be entirely portable.

Wasm today is a toy hardly anyone uses. It can't run many real world C programs which means they'll need to be "ported" to the subset of C wasm supports. Well, if you're willing to work with that constraint you can constrain bitcode in the same way.

By the way Graals LLVM support can execute multiple bitcode versions, with seamless and fast language interop, and it virtualises execution so that e.g. a subset of x86 assembly can be cross compiled on the fly to other arch's. It's needed because so much real C doesn't target an abstract machine but real CPUs.

Re:WebAssembly Interface Types: Interoperate with All the Th... by pjmlp on Thursday August 22, 2019 @07:08AM (#20766721)
Actually LLVM Bitcode can be made portable, that is what Apple does in their store apps for watchOS.
Re:WebAssembly Interface Types: Interoperate with All the Th... by chrisseaton on Wednesday August 21, 2019 @05:36PM (#20762098)
I didn't claim it was a good binary format - I just claimed GraalVM supports it, which it does.
Re:WebAssembly Interface Types: Interoperate with All the Th... by afiori on Thursday August 22, 2019 @02:37AM (#20765282)
But it is not an application delivery format which is the whole point here.
Re:WebAssembly Interface Types: Interoperate with All the Th... by chrisseaton on Thursday August 22, 2019 @04:29AM (#20765876)
I ship LLVM to deliver applications just fine.
Re:WebAssembly Interface Types: Interoperate with All the Th... by pjmlp on Thursday August 22, 2019 @02:46AM (#20765316)
Sure it is, that is what watchOS uses.