Page 4 of 4

Re: WebAssembly

Posted: 15 Sep 2023, 20:14
by jsantos
Hi Vladimir,

This has been low-priority so far, so no progress in this area. Happy to know you are interested in working on this. Please, let me know if you need anything, I assume you are going to use the Managed Wasm library included in our Unity package right? (because the native C++ one is not compatible with C#)

Re: WebAssembly

Posted: 20 Sep 2023, 00:17
by ai_enabled
Hi Jesús,
Yes, I've started by investigating it first. And I certainly need your help as the Managed WASM library (specifically the Noesis.bc bytecode) has some Unity bindings.
I will send you an email soon providing the details.

Regards!

Re: WebAssembly

Posted: 04 Oct 2023, 14:18
by ai_enabled
FYI, together with @jsantos we've worked on this integration but came across this issue with .NET 7 WASM https://github.com/dotnet/runtime/issues/92380 — unfortunately it prevents us from using NoesisGUI C# SDK (there are dozens of callback methods which expect string parameters).
I would appreciate it if anyone could help raise awareness about this issue as two weeks have passed but there is still no feedback. Previously they've fixed a similar issue (with blittable structures). Either way even if the work starts immediately getting the fix in the release version of .NET will probably take several weeks at least...
There is another issue with "null function or function signature mismatch" in Extend_FreeString call but I don't think we can debug it further until the first issue is resolved.

TL/DR: no luck with .NET 7 WASM support.

Regards!

Re: WebAssembly

Posted: 13 Dec 2023, 12:09
by voula_d
The issue https://github.com/dotnet/runtime/issues/92380 is getting some attention and someone has posted a comment with a possible workaround. Is the workaround a viable option for Noesis?

Re: WebAssembly

Posted: 13 Dec 2023, 13:28
by ai_enabled
@voula_d, I've just replied there. I've tried the idea of creating a fork of NoesisGUI C# SDK with the suggested changes. Alas there are so many cases which need to be changed even before I will be able to know whether it's actually a viable workaround. Besides I have no idea how to rewrite [UnmanagedFunctionPointer...] delegates as these are also not blittable.

BTW, lately I've tried Unity again, this time 2023.2.2f1. To my surprise, now async-await works well in WebGL (still no .NET multi-threading support though) and I had no issues with NoesisGUI whatsoever. I was able to even use CommunityToolkit.MVVM code generation for viewmodels (by borrowing the "Plugins" folder from this repository as the NuGet version doesn't work due to referencing an incompatible version of Roslyn Analyzer DLLs, Unity requires a specific version).

Regards!