-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[Wasi]Wasm export functions with name space cannot be invoked correctly #106310
Comments
I guess this is not much of area JS interop, as it's more of a wasi interprop issue... Changed the title to It looks like the generated pinvoke table does not have correct a namespace parameter, as the namespace was conjoined into the type parameter. |
@mkhamoyan when the entry point is defined we need to use it without the namespace, lets discuss |
Tagging subscribers to 'arch-wasm': @lewing |
What changed recently is that I enabled If I add After that namespace change works well for me too. |
Thanks for the information, I copy icudt.dat from other appbundle to the ones that miss the file, and it seems work fine. But I'm not sure if it's the correct workarounds? Also may I ask an additional question? I guess the wasi C# still does not support any kind of break point debug, does it? Will such a support be planned in the future? |
Separate issue for that, steps to reproduce and binlog would help.
WASI is very immature, unsupported experiment for us at the moment. There are many gaps and this is one of them. We had moment where C# debugging worked, but currently sockets need to be fixed. |
This might be a problem with the incremental build if you just changed InvariantGlobalization between builds? |
@pavelsavara @lewing I apologize for hijacking this conversation. Can you point me to where I might ask about getting SkiaSharp (which includes a native libskiasharp library) working in a Wasi Console app? It compiles just fine, but at runtime complains with a DllNotFoundException for the native library. I tried adding the Skia.NativeAssets.WebAssembly package, but I don't think it has targets for Wasi wasm. |
that is something we should discuss at https://github.com/mono/SkiaSharp/issues |
@pavelsavara @lewing OK! I created this issue over there: mono/SkiaSharp#3015 |
Description
If I put a wasm export function into a name space, it allows me to build, but it cannot be invoked correctly.
Reproduction Steps
Let‘s’ take the native interop sample as example: https://github.com/dotnet/runtime/tree/main/src/mono/sample/wasi/native
This works and can be successfully invoked by outside code via name 'ManagedFunc'.
but if I give it a namespace, then run the code, wasmtime gave me an error.
Expected behavior
The code run correctly.
Actual behavior
Regression?
No response
Known Workarounds
Don't put export functions into a namespace
Configuration
No response
Other information
Now, I'm not quite sure if it's a feature or a bug.
Perhaps wasm export functions with namespace actually works, and I just need to change the way the local.c file invoke them? I missed a prefix somehow?
The text was updated successfully, but these errors were encountered: