Paul Krill
Editor at Large

Microsoft .NET 7 bolsters WebAssembly support

news
Sep 28, 20222 mins

Expanded WebAssembly support in .NET 7 allows developers to reuse .NET libraries from JavaScript or build new .NET-based apps that will run on Wasm.

integrated digital tools / interoperable tools
Credit: Mattjeacock / Getty Images

Microsoft’s .NET 7 software development platform, due as a production release in November, improves support for running .NET on WebAssembly in JavaScript-based apps.

Developers can use the expanded WebAssembly support in .NET 7 to reuse .NET libraries from JavaScript or build new .NET-based apps. Featured as part of Microsoft’s effort is a rich JavaScript interop mechanism, according to a Microsoft blog post on September 26.

Microsoft hopes the new capabilities will spur developers to build better integration between the JavaScript ecosystem and .NET. Developers can use existing JavaScript libraries within existing frameworks such as Blazor or Uno, or use them directly. While WebAssembly backing in .NET 7 is the basis for Blazor WebAssembly apps, this support also can be used independently of Blazor.

Current JavaScript apps can use .NET’s expanded WebAssembly support to reuse .NET libraries from JavaScript or to build novel .NET-based apps and frameworks. Blazor WebAssembly apps can use the JavaScript interop mechanism to optimize interactions with JavaScript and the web platform.

Microsoft’s blog post details an example of the workings of JavaScript interop in .NET 7, creating a C# port of TodoMVC, a tool for selecting UI frameworks, based on the vanilla ECMAScript 6 version of JavaScript.

.NET 7 currently is in a release candidate stage of development. Microsoft noted that before .NET 7, developers performing low-level JavaScript interop in Blazor WebAssembly may have used undocumented APIs grouped in the MONO and BINDING JavaScript namespaces. While these APIs are still in .NET 7 for backward compatibility, developers should consider them deprecated.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author