Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
WASM on the JVM Ships Under the Bytecode Alliance (foojay.io)
25 points by dustingetz 13 hours ago | hide | past | favorite | 4 comments
 help



Do I understand correctly that endive ships with a garbage collector and only uses the host gc when references pass over the API boundary? I don't know much about wasm, but would it be possible to use the host gc for everything? Or is there some inherent property of wasm that makes this impossible / less efficient?

Is this going to be a way to execute emscripted-built projects locally? Or is the target something else entirely, like WASM interacting with Java?

Think of WASM as a kinda universal library target. You can compile C, Rust, C#, Java to WASM, and then you can use it in a different language from the source. This way, Java can run C or Rust code without going through a FFI (foreign function interface). From the article, one example is porting tree-sitter (a C library) to Java by first compiling it to WASM, then use Endive to access its function.

As an example of how it can be used, you can look at https://github.com/Christopher-Chianelli/timefold-wasm-servi... and https://github.com/Christopher-Chianelli/timefold-wasm-c-cli..., which was an experiment I did to try using C code inside Timefold Solver (a Java library that can be used to solve constraint problems like Employee Scheduling and Vehicle Routing).


Usecases?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: