Last post Jun 23, 2020 01:27 AM by bruce (sqlwork.com)
Jun 20, 2020 10:27 AMfirstname.lastname@example.org|LINK
looking at Blazor ( webassembly and server side) it does NOT include the possibility to compile c# libraries to webassembly.
i.e. i should be able to grab a .net core library and compile it to webassembly file and include the file in the head of any web page( mvc , razor, or even any html page of my own). but i can't see that as part of Blazor.
am i missing something?
Jun 22, 2020 02:17 PM|Mikesdotnetting|LINK
i should be able to grab a .net core library and compile it to webassembly file
Obviously this potentially exposes your IP to anyone who knows how to use a decompiler. If your .NET libraries contain propriety or commercially sensitive code, you can create a Web API method that leverages the library and delivers the result of any operation
Jun 23, 2020 01:27 AM|bruce (sqlwork.com)|LINK
The is no.c# to webassembly compiler. Mono had an attempt that was used by the blazor prototype. You can probably put a tool chain together. It is a muli-step process
Blazor uses a different approach. They wrote a .net runtime engine in c/c++ and compiled this to webassembly. Then the webassembly supports loading a .net dll and executing the code.
note: web assemblies have a lot of restrictions. No threads, no I/o, no o/s calls, no timers, no dom access, and no garbage collector. They are compute engines. To make a network call or update the dom, they