Replies: 3 comments 1 reply
-
There is a godot backend for Avalonia. https://github.com/MrJul/Estragonia
Avalonia actually has a VNC backend already. Some people are using it. Not entirely sure what for. It is however not particularly well documented and most people don't know it exists. https://www.nuget.org/packages/Avalonia.Headless.Vnc/ Avalonia's only real requirements for a new backend is the ability to draw pixels somewhere and the ability to get input. |
Beta Was this translation helpful? Give feedback.
-
I don't understand what's this issue is about. Any other approach is a no-go. We are not going to compile C# into JS.
Now, |
Beta Was this translation helpful? Give feedback.
-
Running C# in the browser with efficiency requires two things. Those are compilation to WASM and integration with browser API:s such as WebGPU as well as including all the JavaScript glue code that is currently needed for such integrations. Mono-wasm has not been updated in 7 years, is there a fork that is up to date with current wasm standards and browser API:s. It could be a way to go if it could be updated to include that. NativeAOT might become a viable option at some point but it is very far from having the features needed. Godot is nice for game programming but it is not an application programming plat As for compilation to JS they are only mentioned because there are Java tools that goes that route and some of them are quite useful. Although compiling to JS do not imply that all browser API:s are supported so porting one of the Java compilers to DotNet may not provide a complete solution either. Avalonia.Headless.Vnc on the other hand may be the closest to a viable solution when pared to a VNC client running in the browser so that is something that I will dig into. As for a Thick client if I implement it I would probably want to go as high level as possible and replace skia on the Avalonia/server side with a layer that produce a binary scene graph, client side I probably go for C and SDL for rendering. As such there will be no wrapping of API:s for C# as a WebSockets or WebChannels will be the communication layer between C and C#. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
There is currently no good way to run a C# application in a browser. This with the exception of solutions that run game engines in the browser that are scriptable by C# such as godot and unity.
These are the possible solutions:
Describe the solution you'd like
I think that my preference is to have both a thin and a thick client as they both are optimal for their respective use cases. A thin client similar to RDP/VNC is optimal when the clients are weak and the server has lots of power and the additional advantage that it can fit right into the existing pipeline (using the existing Avalonia renderer off screen and sending the output over the network). A thick client uses less bandwidth, have lower latency and demands less from the server which is useful whenever the client can handle it.
I also think that both of these are simpler than getting C# code running in the browser. Also if both options are standardized well enough they can be used not only in other dotnet solutions but independent on server side language. The thick client I described is a bit like taking HTML, make it storage/bandwidth efficient, extending it with tags and attributes until no JavaScript is needed and finally make the DOM remotely updateable using WebSockets/WebChannels (SignalR?).
Describe alternatives you've considered
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions