WASI Will Change .NET Forever! Run WebAssembly Outside The Browser!

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024

ความคิดเห็น • 52

  • @JamesMontemagno
    @JamesMontemagno  10 หลายเดือนก่อน +5

    Thanks for all the great comments and questions. I will pin this to help answer some of them. When it comes to Wasm and WASI I look at it less of UI and more about libraries, small programs, and just logic/functions that I want to be able to run anywhere or inside of other programming languages that support WASI. Now you may be saying well .NET runs pretty much anywhere.. yes, that is true, but there are always new OSes, distros, PaaS platforms, embedded systems, and new runtimes/programming languages. That means for example you could take your .NET code compiled to wasm and run it in Hippo, a WebAssembly PaaS platform: github.com/deislabs/hippo, or you could take it and run it inside of a Swift or Rust application. The reverse is true as well being able to now take modules written in other languages and embed them into your .NET app. Hyperlight is an example of a Wasm-enabled cloud that could spin up super lightweight and secure hypervisors near instantly. (th-cam.com/video/Tz2SOjKZwVA/w-d-xo.html). The best part here is to run these wasm modules anywhere you don't need a .NET runtime, a .NET host, or even an OS or programming language that supports .NET/C#, you can just execute it with the Wasm Host... in the case of what I showed is wasmtime.
    These are pretty advanced scenarios that maybe aren't for everyone, but to me it is exciting to see .NET part of this journey into cutting edge technologies. Here are some more links to dive through:
    Rich's blog: devblogs.microsoft.com/dotnet/extending-web-assembly-to-the-cloud/
    Merge Conflict: th-cam.com/video/7h0SufGLx_w/w-d-xo.html

  • @JuanDevelop
    @JuanDevelop 10 หลายเดือนก่อน +1

    Good to see you sharing amazing things. By the way, Merry Christmas

  • @njbrad007
    @njbrad007 10 หลายเดือนก่อน +2

    Mind blown, before the 30 second mark!!

  • @micheladey
    @micheladey 9 หลายเดือนก่อน +1

    Great video! Is it possible to have a Blazor frontend running with a Wasi server using the Blazor SSR model ?

  • @HomeSlize
    @HomeSlize 10 หลายเดือนก่อน

    Awesome! Now I have something to tinker with over the weekend. Thanks for sharing.

  • @LeonardHarrisLH
    @LeonardHarrisLH 10 หลายเดือนก่อน +5

    A video should be done on Maui vs Maui blazor vs, Blazor Server, Blazor wasm and now Blazor web apps in net 8? We need a video to cover all these things? Maui and blazor

  • @dotnetdevni
    @dotnetdevni 10 หลายเดือนก่อน +2

    Finally james has the senior dev hair cut :-) welcome to club man 👨

  • @mahdi8572
    @mahdi8572 10 หลายเดือนก่อน +2

    I tried to use c# dev kit once, why does it like to put opening braces on the same line by default? and I couldn't find an easy way to disable that behavior 🤷‍♂

  • @austenfrostad7675
    @austenfrostad7675 7 หลายเดือนก่อน

    @6:10 Wasitime is available for a bunch of platforms. Dotnet Runtime is available for a bunch of platforms. I understand there is some perks to using wasm, like a blazor app can be ran as a desktop app, but why compile an app that is not for browsers to wasm? That is what this video has me wondering. Any insights!?

  • @adamstraughan3861
    @adamstraughan3861 10 หลายเดือนก่อน +1

    I assumed the whole point is, i can write a useful package/library in any language that compiles to the WASI standard and use it in any other WA host.
    I'm less convinced by writing a single program in one language this was unless the target was WASI only, or somehow was not an existing dotnet target

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน

      Yea both of these are valid!

  • @serratedsharp4854
    @serratedsharp4854 9 หลายเดือนก่อน +2

    It doesn't look useful when you think only about the .NET ecosystem. However, we are often dependent on non .NET tooling, and building those tools in .NET has never made sense because they wouldn't have the support of the broader community that something like an NPM package has. Secondly, there's a lot of redundancy in implementations across language ecosystems. We will be able to build packages that have a much wider audience and in turn be able to consume tooling/packages from other languages with greater ease without the burden of their runtimes. .NET will also make more sense for building tools that potentially have a wider audience beyond the boundary of the .NET ecosystem. How many of the same logic/tools/libraries exists in many different languages redundantly due to lack of interoperability?

  • @wvvwwwvvw
    @wvvwwwvvw 10 หลายเดือนก่อน +1

    Soooo, could you also have code that listens for COM port data received and pass it on to the browser?!

  • @programmerstalks7196
    @programmerstalks7196 10 หลายเดือนก่อน

    When we will MAUI mind blowing release come out to happy our customer for their app which already migrate from xamarin to maui , but most of the issue still in progress due lack of perfect releases. No need to worry about them, I told you just to know whats your end user wants in your technology updates and fixes... Happy Weekends

  • @LWAzure
    @LWAzure 10 หลายเดือนก่อน +1

    Thus looks interesting mate :-)

  • @brianchipendo3132
    @brianchipendo3132 10 หลายเดือนก่อน +1

    Great now I that I can take my C# code anywhere. No more limitations, many posssibities

    • @briumphbimbles
      @briumphbimbles 10 หลายเดือนก่อน +2

      You could already do that

    • @Chris-zb5nm
      @Chris-zb5nm 10 หลายเดือนก่อน

      OMG, dotnet can already run everywhere like more than 10 years.

  • @ulrich-tonmoy
    @ulrich-tonmoy 10 หลายเดือนก่อน +1

    so like jvm + docker like concept whats the performance difference with the native

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน

      A bit different. With containers you have like host os, runtime, dependencies, etc. wasm hosts are a bit like containerd in this instance.

  • @youdiegocardosotube
    @youdiegocardosotube 10 หลายเดือนก่อน

    Ok but what’s the advantage to use is instead of the .NET framework directly. I thought you could create a shared UI running into the browser and the host OS. I think it will possible in the future. Isn’t?

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน

      This isn’t really about UIs, it is about taking the logic, functions, ect. And making it portable to run anywhere now that wasm modules can run including inside of other programming languages and runtimes that support wasi

  • @CEIACEIA-k5q
    @CEIACEIA-k5q 10 หลายเดือนก่อน +15

    I don't see the point of it at the moment.

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน +3

      Run .NET Anywhere without .NET being required.. great for all sorts of scenarios, small little functions, embedded, http servers, you name it

    • @WDGKuurama
      @WDGKuurama 10 หลายเดือนก่อน +2

      ​@@JamesMontemagnobut the runtime to run the webassembly is required too, what's the real deal about replacing the dotnet runtime with another one that might be slower? It's already cross platform.

    • @modernkennnern
      @modernkennnern 10 หลายเดือนก่อน

      The dream is for you to have full interop across all languages. If all you're doing is writing AspNetCore APIs using C# there's little-to-no reason to use WASI. Although, even then you can see reasons to use it.
      Some languages are built around solving specific tasks. Take Python for example. Python is famous for data science (why? I don't know, but let's stick with it for now), so if you wanted some data science-y thing in your AspNetCore API then wouldn't you love to use Python for that specific aspect? That's where WASI comes in.
      It's basically microservices with less of the annoyances that comes with orchestration.

    • @serratedsharp4854
      @serratedsharp4854 9 หลายเดือนก่อน

      ​​@@WDGKuuramaConsider just as an example a build server for any language. Often it has to have a variety of tools from disparate languages and runtime dependencies. It's fragile and you have to virtually be an expert in all of them to troubleshoot errors. If all of the tooling is instead compiled to WASM, then you only need one runtime instead of many. There's a variety of other benefits of the WASM packages being self contained and achieving better encapsulation and interoperability. It's easy to armchair quarterback this and dismiss it with a hand wave. It's more nuanced if you look at specific usage scenarios where it would be more appropriate. I'd love not to have NPM packages compiling locally from source, or deal with both python and nodejs runtimes as part of my build tooling.

    • @WDGKuurama
      @WDGKuurama 9 หลายเดือนก่อน

      @@serratedsharp4854 i see, even though i don't think i will make much use of this before at least 10 years X)

  • @kreont1
    @kreont1 6 หลายเดือนก่อน

    Im failed when use "dotnet run" -- WasmAppHost --runtime-config d:\temp\WASI\bin\Debug
    et8.0\wasi-wasm\AppBundle\WASI.runtimeconfig.json
    Error: Cannot find host wasmtime: Tried to look for wasmtime.exe, wasmtime.cmd, wasmtime.bat in PATH: C:\Windows\system32, C:\Windows, C:\Windows\System32\Wbem, C:\Windows\System32\WindowsPowerShell\v1.0\, C:\Windows\System32\OpenSSH\, C:\Program Files\dotnet\, C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\, C:\Users\KPU24\AppData\Local\Microsoft\WindowsApps, C:\Users\KPU24\.dotnet\tools . What to do ???

  • @CEIACEIA-k5q
    @CEIACEIA-k5q 10 หลายเดือนก่อน +1

    Where did Visual Studio 2022 go?

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน

      I is both VS and VSC every day.

  • @PticostaricaGS
    @PticostaricaGS 10 หลายเดือนก่อน

    Is WASI already official or is it still experimental?

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน +1

      Experimental. The interface itself is still getting speced out. Read the blog I linked to.

    • @flibbertigibbet6324
      @flibbertigibbet6324 9 หลายเดือนก่อน

      The WASI industry has reinvented itself over the past year and rebased its thinking around WASM components, this is called the Preview-2 release. The difference between Preview-1 and Preview-2 is major with the spec expected to be locked down Jan/Feb 2024.

  • @briumphbimbles
    @briumphbimbles 10 หลายเดือนก่อน +3

    But why?

    • @mahdi8572
      @mahdi8572 10 หลายเดือนก่อน

      I think you don't need to have dotnet runtime installed? maybe useful on some hosting service where they support this wasm runtime and not dotnet?

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน

      Exactly! No .net runtime installed. It runs is a wasm host such as wasm time

    • @flibbertigibbet6324
      @flibbertigibbet6324 9 หลายเดือนก่อน

      A 1 to 2 orders of magnitude increase in the runtime density of cloud hosted applications, accountants will get it but I can foresee a challenge ahead to win developers over.

  • @muaadeeb9625
    @muaadeeb9625 10 หลายเดือนก่อน

    Love it! Any chance for a demo app?

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน

      What do you want to see. Check the blog for good examples

  • @facts247
    @facts247 10 หลายเดือนก่อน

    what about UI? visual apps are everything

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน

      Lots of options if you need UI: .NET MAUI, Uno, Avalonia, Blazor…

  • @PeacefulMindss
    @PeacefulMindss 10 หลายเดือนก่อน

    I hoped for MAUI to run on the browser, they gave us this!, what's wrong with them.

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน

      These are very different things

  • @queenstownswords
    @queenstownswords 10 หลายเดือนก่อน

    What is the use case for AOT vs WASI?

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน

      You can AOT Wasi!!!!!!!! Whoa! I mean AOT is just for specific platforms.

  • @Chris-zb5nm
    @Chris-zb5nm 10 หลายเดือนก่อน

    Sorry but your video is confusing everybody as you can see in the comments.
    What's the porpuse of this now? Why would I work with this when I can just use the normal Console,WPF, etc. application? There must always be a runtime installed on the target machine to run the application whether it's Java, Python, Dotnet or whatever. You even yourself installed it in this video!

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน

      To developer yes I need to have the .NET SDK, when I compile down to wasm I get a wasm module that can be executed anywhere wasm can run. And now through WASI and host such as wasitime that is anywhere basically. This means more places and opportunities to run you .net code. No .net runtime needed in this case

    • @JamesMontemagno
      @JamesMontemagno  10 หลายเดือนก่อน

      It also means that you can take any wasm module and load it up into other programming languages and run it there too. For example you could take a wasm module written in rust and run it inside of your .net app

    • @petrkomarek7249
      @petrkomarek7249 10 หลายเดือนก่อน +1

      ​@@JamesMontemagno It would be really interesting to see an example. What would be the signature and data types of such shared methods/functions ? I mean for example nullable types, collections ....