wasmer-java icon indicating copy to clipboard operation
wasmer-java copied to clipboard

Bump wasmer dependencies to 2.0.0

Open jcaesar opened this issue 4 years ago • 4 comments
trafficstars

Since wasmer-runtime doesn't exist anymore in 2.0, I wonder what this should look like.

Or maybe it's time to rewrite wasmer-java to more closely follow the new API introduced with 1.0?

jcaesar avatar Jun 13 '21 14:06 jcaesar

Hello, Yes we are planning to rewrite the extension to improve its API. But your PR is valid though :-), thnaks!

Hywan avatar Jun 15 '21 07:06 Hywan

Hm. It's about 30% slower on instantiating modules in a tight loop because the global store is gone. Also, after about 16300 instantiations (suspicious number, I know..) it fails with

Exception in thread "main" java.lang.RuntimeException: Failed to instantiate the module: Insufficient resources: Failed to create memory: Error when allocating memory: System call failed: Cannot allocate memory (os error 12)

but that's the same with 1.0.2.

jcaesar avatar Jun 19 '21 09:06 jcaesar

@jcaesar The number caught my eye: 16300 is the exact number that I read a few minutes ago in this repo: https://github.com/cretz/asmble#caveats (search for 16300). I wonder if it's related somehow? Unsure what the Java wrapper does under the hood but figured I'd toss this here.

aristotaloss avatar Sep 02 '21 12:09 aristotaloss

I think that's coincidence. I never measured the exact number though, it might be 0x4000, e.g.

jcaesar avatar Sep 03 '21 00:09 jcaesar

(Cleaning up my open PRs. 3.0 will be out soon, too.)

jcaesar avatar Aug 28 '22 03:08 jcaesar