
Using WebAssembly from .NET with Wasmtime - skellertor
https://hacks.mozilla.org/2019/12/using-webassembly-from-dotnet-with-wasmtime/
======
jcmontx
I know MSFT technologies get a lot of hate here, but ASP.NET Core is pretty
awesome. Blazor (the wasm based framework) is innovative and a positive step
forward frontend web development.

You should leave your prejudices aside and give it a try if you haven't yet.

~~~
hackinthebochs
Since you seem to have a positive sentiment towards Blazor, can you point me
to a good introduction that demonstrates the power and the benefits of the
framework, e.g. increased expressiveness, reduced friction, etc? I've looked
through a couple of intros but they never seemed to really sell the benefits
of it. As someone who loves the C# language and .NET ecosystem I really want
to like it but nothing has clicked so far.

~~~
Gene_Parmesan
Attended a Blazor session at MS Build in May. My impression was, Blazor seems
like a super cool tool that I will never be able to justify in production. For
one, the performance is poor right now. Your options are either to use Signal
to send every action over the network, or to deliver the entire .NET libraries
along with the page. The size of that download is both impressively small
(given the volume of code you're transferring), and also still way too large
for me to feel comfortable foisting that on users.

Additionally, it requires that your front-end team feels comfortable working
in .NET technologies. Ours certainly doesn't, and it would be very hard to
sell my director on anything that doesn't maintain the traditional
backend/frontend split.

~~~
cm2187
Yeah, don’t use that for a blog (but please don’t use a SPA for a blog
either).

But think internal applications, legitimate SPA (webmail, trading platform),
PWA.

------
syrusakbary
Great work on the article and extension Peter!

I didn’t see any reference to existing work in this area in the article, I’m
curious to know how this differs from projects like WasmerSharp by Miguel de
Icaza released a few months ago.

[https://github.com/migueldeicaza/WasmerSharp](https://github.com/migueldeicaza/WasmerSharp)

~~~
sanxiyn
One obvious difference is that WasmerSharp wraps Wasmer. Wasmer and Wasmtime
are different.

------
Nelkins
For anyone curious, the actual .NET Wasmtime package source is here:
[https://github.com/bytecodealliance/wasmtime/tree/master/cra...](https://github.com/bytecodealliance/wasmtime/tree/master/crates/misc/dotnet)

------
cryptozeus
MS also have their own take on WebAssembly

[https://dotnet.microsoft.com/apps/aspnet/web-
apps/blazor](https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor)

~~~
resoluteteeth
That's something different. Blazor compiles c# to webassembly to run in the
browser.

This software (Wasmtime) allows you to run webassembly code from within .net.

~~~
giancarlostoro
So in theory you could run Blazor on Wasmtime?

~~~
cptskippy
Yes and that's like going out the front door and coming in the back door to go
from the Kitchen to the Den.

~~~
giancarlostoro
I'm not advocating anybody do that, but it's a fun experiment to think about.
I've been intrigued about WebAssembly more than ever when I read a comment
here on HN that the specs very generic allowing it to be used even outside the
web.

~~~
anon73044
I'll take a WebAssembly desktop app over an Electron desktop app any day of
the week

~~~
erk__
You can always run webassembly inside of electron :P

Though I agree it could be a nice way to make software avaiable on all
platforms.

~~~
giancarlostoro
The sweet spot would be something like Sciter supporting WebAssembly.

------
jonny383
Please don't pollute the web with .NET on the client side too. Do we _really_
need this?

~~~
userbinator
MS has had ".NET on the client side" for quite a while now. It's called
Silverlight.

~~~
jonny383
Silverlight was deprecated.

~~~
pjmlp
Kind of,

[https://platform.uno/silverlight/](https://platform.uno/silverlight/)

