Skip to content
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

Symbol clash / override #112

Closed
saghul opened this issue Feb 26, 2020 · 4 comments
Closed

Symbol clash / override #112

saghul opened this issue Feb 26, 2020 · 4 comments
Labels
question Some information is requested

Comments

@saghul
Copy link
Contributor

saghul commented Feb 26, 2020

Hi there,

I'm currently integrating wasm3 as the WASM engine for QuickJS. Here is my work so far (in case you're curious): saghul/txiki.js#121

It's going great so far, but when writing some tests I noticed some odd behavior I'd like to clarify. I took the spec tests and wanted to run some operations to validate the correctness of the integration but I noticed that if I use a single runtime then the last "add" function which is loaded (for example) shadows the previous ones. So, if I have some add(i32, i32) and then load some add(f32, f32) the latter will be the one used.

I resorted to having separate runtimes per WebAssembly.Instance, since that would avoid the issue, but I'm not 100% sure I'm doing the right thing here.

Any ideas would be welcome.

@vshymanskyy
Copy link
Member

First of all. Wasm3 + QuickJS is a perfect match and I'm so glad you started working on it!..
Let me see what's going on there..
It would be exciting to get this working. I think Wasm3 may be missing a good part of APIs that are needed for this, but let's work through it.

@vshymanskyy
Copy link
Member

@saghul I just checked this. I think you did the correct thing. You need a runtime per wasm module. Unless you want to link multiple wasm modules (which is not currently supported anyway).
I also added a new emscripten_lib platform, which demonstrates how to expose Wasm3 API to JS (using Emscripten).

@vshymanskyy vshymanskyy added the question Some information is requested label Apr 18, 2020
@bonifaido
Copy link

Is this still the current case? So you need one runtime per module to avoid clashes and module linking is still not supported?

@vshymanskyy
Copy link
Member

most probably!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Some information is requested
Development

No branches or pull requests

3 participants