Endive:一个 JVM 原生的 WebAssembly 运行时
Endive: A JVM native WebAssembly runtime

原始链接: https://github.com/bytecodealliance/endive

Endive 是 Bytecode Alliance 的一个项目,旨在提供一个 JVM 原生的 WebAssembly (Wasm) 运行时。它专为简洁与安全而设计,使得 Wasm 能够在任何运行 JVM 的环境中执行,而无需 JNI 或其他原生依赖。 与现有的使用 C、C++ 或 Rust 编写的运行时不同(这些语言迫使开发者在不同的架构和操作系统上管理复杂的原生库分发),Endive 完全使用 Java 构建。通过避免使用原生代码和外部函数接口 (FFI),Endive 让你的应用程序保持在 JVM 的安全、内存管理和可观测性生态系统中。 Endive 最初由 Dylibso, Inc. 在 2023 年以“Chicory”为名孵化。其主要目标是成为 JVM 的默认 Wasm 运行时,确保强大的安全性,支持完整的 Wasm 规范,并为宿主语言提供符合惯例的集成方式。对于希望在受限环境中运行 Wasm 模块,同时又想保持纯 Java 的可移植性和便捷性的开发者来说,这是一个理想的解决方案。

抱歉。
相关文章

原文


A Bytecode Alliance hosted project

Website | Getting started | Blog | Contributing

Interpreter Test Results Compiler Test Results WASI Test Results

Zulip

Endive is a JVM native WebAssembly runtime. It allows you to run WebAssembly programs with zero native dependencies or JNI. Endive can run Wasm anywhere that the JVM can go. It is designed with simplicity and safety in mind.

Endive is a fork of Chicory by Dylibso, Inc. We thank Dylibso for the incubation period and their foundational work on this project.

Reach out to us: let us know what you are building with Endive. Join our Zulip chat.

Get started now with the official documentation

There are a number of mature Wasm runtimes to choose from to execute a Wasm module. To name a few v8, wasmtime, wasmer, wasmedge, wazero etc.

Although these can be great choices for running a Wasm application, embedding them into your existing Java application has some downsides. Because these runtimes are written in C/C++/Rust/etc, they must be distributed and run as native code. This causes two main friction points:

If you're distributing a Java library (jar, war, etc), you must now distribute along with it a native object targeting the correct architecture and operating system. This matrix can become quite large. This eliminates a lot of the simplicity and original benefit of shipping Java code.

At runtime, you must use FFI to execute the module. When you do, you're effectively escaping the safety and observability of the JVM. Having a pure JVM runtime means all your security and memory guarantees, and your tools, can stay in place.

  • Be the default runtime for Wasm on the JVM
  • Be as safe as possible
  • Make it easy to run Wasm in any JVM environment without native code, including very restrictive environments
  • Fully support the core Wasm spec
  • Make integration with Java (and other host languages) easy and idiomatic

Endive development builds on years of work started in September 2023 as Chicory. If you have an interest in working on any of these please reach out in Zulip!

See ADOPTERS.md for the full list of organizations and projects using Endive.

联系我们 contact @ memedata.com