alt.hn

5/28/2026 at 4:40:33 PM

Endive: A JVM native WebAssembly runtime

https://github.com/bytecodealliance/endive

by theanonymousone

5/28/2026 at 8:30:47 PM

Shameless plug: we solved the opposite problem, running any Java application in the browser via WebAssembly: https://labs.leaningtech.com/blog/cheerpj-4.3

And yes, it does run Minecraft as well :-) https://browsercraft.cheerpj.com/

by apignotti

5/29/2026 at 8:35:56 AM

But can it run Endive?

by ____tom____

5/29/2026 at 9:08:00 AM

Not something I tried myself, but conceptually if it's Java it should work.

CheerpJ Just-In-Time compiles Java bytecode at runtime, so it makes no difference if the classes come from JAR files or are dynamically generated.

by apignotti

5/29/2026 at 8:38:21 AM

I wonder what the performance loss is for each level?

by ____tom____

5/29/2026 at 9:39:45 AM

Mmhh should work for clojure as well then. I should try this.

by panick21_

5/29/2026 at 11:37:30 AM

I can confirm non-Java languages work as expected. I've personally tried Kotlin, and IIRC some user from the community reported Clojure to be working as well.

Consider joining our Discord for help: https://discord.leaningtech.com

by apignotti

5/28/2026 at 8:39:01 PM

This is a fork of Chicory, a bit more context of the relationship between the projects can be found here:

https://github.com/dylibso/chicory/issues/1296

by syrusakbary

5/29/2026 at 6:33:16 AM

Any background / context around what the Chicory author means in this comment?

> We'll consider merging in changes that make sense from Endive, but under the stewardship of the [Byte Code Alliance] I have very little faith in its future. My words mean nothing though having all but completely lost interest and use for WebAssembly.

What's the background / history of Byte Code Alliance?

by martypitt

5/29/2026 at 1:38:04 PM

Not everyone is on board with CORBA but with WebAssembly, which is basically what the reboot of the component model is, so probably that.

The AssemblyScript folks have a similar opinion.

by pjmlp

5/29/2026 at 3:13:39 PM

yeah that is roughly the concern, many runtimes didn't want to continue on past wasip1, mostly because of the component model.

by bhelx

5/29/2026 at 2:57:15 PM

[dead]

by throawayonthe

5/29/2026 at 11:11:06 PM

The comment is from the Dylibso CEO.

by andreaTP

5/28/2026 at 9:45:29 PM

Projects like this would be significantly funner and easier to make in Jdk25+(well technically 24+) because of the new Java classfile/bytecode API. It looks like Endive uses OW2 ASM, probably because this supports back to Jdk11. The new jdk API has a minimum target of Jdk17. OW2 ASM is significantly harder to use IMHO though.

What got me into this is I just finished a major release of Petrify (https://github.com/exabrial/petrify) that compiles ML Models to JVM Bytecode. It requires Jdk25 to do the compilation, but the compiled models can run on Jdk17+.

I'm looking for more side projects to use the classfile API on.

by exabrial

5/29/2026 at 8:34:53 AM

bytecode manipulation has been a thing ever since late 90s and early 2000s (e.g. BCEL, Jan, 2001), along with byte code decompilation.

Generally one must understand how bytecode signatures, all flavors of invoke, and constant pool work. After that using visor pattern or 'functional' alike stuff makes no difference whatsoever.

I have used (still using) bytecode manipulation along with custom classloaders as part of my job (albeit not on daily basis any longer). Personally, I don't consider objectweb asm hard to use in any way. and java's class file won't be funnier - perhaps it was the very project I'd not pick bcel, though.

by xxs

5/29/2026 at 3:14:07 PM

if i understand correctly, the new redline compiler doesn't have these limitations. it's not based on asm. (edit: but this hasn't been merged to mainline yet)

by bhelx

5/28/2026 at 9:12:14 PM

On the CNCF wasmCloud Community call this week we played with this: - a demonstration of Endive - implemented CNCF wasmCloud host - Integrated into Vert.x as an example

And discussed the roadmap.

Blogpost and video here: https://blog.cosmonic.com/engineering/2026-05-26-diving-into...

by hectaman

5/28/2026 at 7:46:50 PM

Lots of context for this project on the Bytecode Alliance blog: https://bytecodealliance.org/articles/endive-and-the-next-ch...

by phickey

5/29/2026 at 6:16:59 AM

Ah, looks like they will be packaging a Rust runtime on top, not as interesting as I thought.

by pjmlp

5/29/2026 at 3:18:10 PM

the "redline" compiler is cranelift which is written in rust, but i think it's being compiled to Wasm first then JVM bytecode so it still works zero dependency. not sure if that will continue to be the case.

by bhelx

5/28/2026 at 8:32:42 PM

It will be really great if this becomes a second popular runtime with both GC and WASI component model support. Wasmtime being the only runtime with that combo is a bit concerning. Node supporting the component model will help a lot too.

by spankalee

5/28/2026 at 9:04:42 PM

The component model is still in phase 1 (standardization is phase 5) and the Bytecode Alliance are its sponsors and the ones pushing it into the ecosystem with wasmtime.

by asibahi

5/28/2026 at 11:31:03 PM

I don't think you're fully saying what you want to here. Are you saying this is bad?

The point of a component model is interoperability, so the more runtimes that support it the better.

by spankalee

5/29/2026 at 10:04:50 AM

I am saying as far as anyone other that the Bytecode Alliance is concerned it is custom API for Bytecode Alliance projects.

by asibahi

5/29/2026 at 12:08:36 AM

I think just pointing out that it's still in stage 1 so it makes sense that it's not supported in every runtime yet

by subarctic

5/28/2026 at 7:29:17 PM

I guess we can come full circle and eventualy port it to Android Java.

by pjmlp

5/29/2026 at 11:08:10 PM

Android is supported!

by andreaTP

5/29/2026 at 12:27:25 PM

I was trying to write something like this in rust at some point, just for the joke that you can compile that rust to wasm, and then it can compile itself to JVM assembly. The complexity of it turned out to be quite a bit too high for a joke only.

by krautsauer

5/28/2026 at 8:14:15 PM

Is this being handed over to the Bytecode Alliance or is this a hard fork and will diverge from Chicory? It isn't clear from the announcement but I suspect the former.

by zcw100

5/28/2026 at 5:54:53 PM

See also: https://www.graalvm.org/webassembly/docs/

by gavinray

5/28/2026 at 8:20:57 PM

Yeah, this was the first thing that came to mind, how does this compare to the Truffle WASM implementation. The Graal Polyglot API is pretty incredible, we've been using it for a JavaScript/Python plugin system in a JVM app, and it's been amazing.

by jbaiter

5/29/2026 at 3:24:00 PM

Agree about Graal being really good. there are some different use cases for embedding wasm in an application. chicory / endive is not just for embedding another language. the main use case was always secure plugin-systems. but there are other use cases. also it's not controlled by Oracle and works well outside of their ecosystem, which i think some people value. this question came up a few times and were addressed in talks and blog articles:

https://github.com/dylibso/chicory#on-the-press

by bhelx

5/29/2026 at 7:23:23 AM

Why not resurrect applets? We had this webasm thing 30 years ago.

by GoblinSlayer

5/29/2026 at 7:31:39 AM

The two main points are that wasm is entirely sandboxed and that it's designed to be streamed, and to start up very quickly. The official Java youtube channel coincidentally posted this two days ago - https://www.youtube.com/watch?v=fy0KyGLrbJo - which includes some interesting details.

by Defletter

5/29/2026 at 1:07:40 AM

Another Shameless plug: A common interface for webassembly engines, including Chicory, in Java https://github.com/tegmentum/webassembly4j

by tegmentum

5/29/2026 at 11:44:12 AM

I wrote this for a number of reasons but oddly enough Java probably has the most options as far as runtimes go but the support is pretty fractured. The underlying runtime adapters add support for wasmtime and wamr as well. There are two JNI implementations for wasmtime but they are badly out of date and haven't been updated in years. There are a number of reasons you might want to use one runtime over another and this was supposed to unify them under a single interface and make swapping them out easy. It also allows you to easily compare the tradeoffs of various engines.

by tegmentum

5/28/2026 at 9:32:15 PM

Finally we can run Kotlin/WASM on desktop! /s

by outadoc

5/29/2026 at 7:10:34 AM

[dead]

by pseudopolous