Can the bootstrapper be used for wrapping a .NET library for use in JS browser applications? #507
-
Hi, I have a C# library that I would very much like to make available to existing JS applications. It would replace an HTTP request with in-browser computation, and could be wrapped in a static C# class with a single method accepting a request object and returning a response object (as objects, serialized as JSON if required). Basically enabling the app to switch between online and offline mode. I am trying to find out if Uno.Wasm.Bootstrap is suitable for this purpose. I noticed that it explicitly requires an entry point, which does not naturally fit into this scenario. I can of course define an empty main method, but is there any support for explicitly "exporting" methods, or put differently: Can I be sure my API method will not be eliminated by tree shaking? Is the way forward simply an empty main and a static method accessed using PS: I am aware of https://github.com/Elringus/DotNetJS which seems a better fit, but it does not support AOT which is critical for my use-case |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
It is not yet possible, but .NET 7 is working to bringing what's required to this particularly scenario. .NET 6 was missing modularization, and it'll be brought forward then. |
Beta Was this translation helpful? Give feedback.
It is not yet possible, but .NET 7 is working to bringing what's required to this particularly scenario. .NET 6 was missing modularization, and it'll be brought forward then.