-
Notifications
You must be signed in to change notification settings - Fork 77
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
Embedding multiple engines implementing wasm C API #165
Comments
Given typical linking models, which rely on a more or less global name space for public symbols, I don't that can be done in common environments. This isn't a problem specific to this API, though, AFAIAA. What is the use case? If it is to select one engine at runtime, could you dynamically link it? |
As long as you're building everything from source and you're using C++, I think this could fairly easily be done by adding namespaces: include several copies of If your requirement is to use unmodified/prebuilt engines, then I agree with @rossberg that you can only link one implementation of any given API at a time. |
We have a similar problem, but our needs are more specific in that we need to use multiple engines at the same time. It looks like the go-bindings for all engines are using cgo, which are all load-time linking. Depending on the situation it looks like we need to maintain all the engine go-bindings ourselves to implement the runtime linking. This is very tedious work, I came to see any friend who encountered a similar problem and already had a more elegant solution. |
Hi there,
Is there any practical way of building a binary containing multiple different wasm engines which all implement the WebAssembly C API?
The text was updated successfully, but these errors were encountered: