-
-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running wasm modules in wasmer #575
Comments
Heh, I started trying this last week. About the imports: those are normally provided by JavaScript, and normally you'd have to make an equivalent implementation in your host system (Rust or whatever you're using wasmer through).
Short demo of what I have so far: https://github.com/jcaesar/wastea Further discussion: #568 (comment) |
It's called to print uncaught exceptions. Run 1.Every object has a 32-bit header (bit 31 is a GC mark bit, bit 30 is a old generation flag, bit 29 reserved, bits 28-0 are address of class divided by 8), you can simply skip it. But you can take existing exports that parse strings in heap for you (i.e.
No, it's for debugging purposes only. I lacked full gdb power when developed initial wasm implementation (not checked current state of wasm debuggers), so came up with idea to generate C code right from wasm AST I generate to produce wasm binaries. You can see
@jcaesar did you try writing your logic in |
@jcaesar thank you for the project link and reply. Great work. I'm a newcomer to wasm, so please forgive any misunderstandings I still have. I turned to TeaVM after my initial search and trial with GraalVM failed - their implementation is far too unstable. My work is specifically in the area of decentralised multi-network ledgers and I'm looking at wasm as a common bytecode/vm for contract definition and execution. My firm's clients vary from startups to tier-1 financial services - hence support for a wide range of languages (including JVM languages) being a key requirement. From my naive perspective (and with recollections of previous interface issues such as Java JNI vs Microsoft RNI) it seems to me that what may be incredibly useful for the entire wasm community is a standard 'core' ABI, containing common functions (each ABI has a logging facility, as an example). That way wasm modules built from disparate languages can co-exist in the wide range of application environments. I recently found WASI which is a subgroup of the WebAssembly CG has an extensive (very large?) ABI that's documented here. I wonder if there's any scope in TeaVM to support WASI? Are there alternative efforts to standardise? Thanks and regards, |
Ty, That works, even if I leave my logic as is and just call the empty main method first.
That I cannot reproduce. I just get some nasty stack trace.
|
In case it's of interest, I've recently been experimenting with using TeaVM to build Spin apps: https://github.com/dicej/spin-http-java. Spin is based on Wasmtime rather than Wasmer, but model is generally the same. I expect that once the component model is fully implemented it will be pretty straightforward to host TeaVM modules in non-browser contexts by virtualizing things like One thing that would need to change in TeaVM is to make the heap offset and data segment offset configurable so that there is room to allocate the buffers needed for canonical ABI marshalling of e.g. strings, lists, etc. |
See #610 for a patch which adds a |
Hi,
I'm working on integrating JVM languages with the wasmer runtime and CLI and I'm trying out TeaVM to this end. The intention is to use wasmer as a general purpose wasm execution library so that wasm modules, written in JVM languages, can be hosted in server-side processes in a language agnostic manner.
The challenge I'm facing is what to do with TeaVM's
wasm-runtime.js
. Does anyone have an experience of attempting to achieve the same?Thank you,
dazraf
The text was updated successfully, but these errors were encountered: