From 7de215df73cc9f79ce1ffa2ecb1bbb5ee82aa8da Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Sat, 27 Nov 2021 06:52:49 -0600 Subject: [PATCH] Include WASM build tools in Tooling topic (#24088) --- aspnetcore/blazor/host-and-deploy/webassembly.md | 4 +++- aspnetcore/blazor/tooling.md | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/aspnetcore/blazor/host-and-deploy/webassembly.md b/aspnetcore/blazor/host-and-deploy/webassembly.md index 6e3a93a055..7777f6de47 100644 --- a/aspnetcore/blazor/host-and-deploy/webassembly.md +++ b/aspnetcore/blazor/host-and-deploy/webassembly.md @@ -29,6 +29,8 @@ Blazor WebAssembly supports [ahead-of-time (AOT) compilation](/dotnet/standard/g Without enabling AOT compilation, Blazor WebAssembly apps run on the browser using a .NET Intermediate Language (IL) interpreter implemented in WebAssembly. Because the .NET code is interpreted, apps typically run slower than they would on a server-side [.NET just-in-time (JIT) runtime](/dotnet/standard/glossary#jit). AOT compilation addresses this performance issue by compiling an app's .NET code directly into WebAssembly for native WebAssembly execution by the browser. The AOT performance improvement can yield dramatic improvements for apps that execute CPU intensive tasks. The drawback to using AOT compilation is that AOT-compiled apps are generally larger than their IL-interpreted counterparts, so they usually take longer to download to the client when first requested. +For guidance on installing the .NET WebAssembly build tools, see . + To enable WebAssembly AOT compilation, add the `` property set to `true` to the Blazor WebAssembly app's project file: ```xml @@ -51,7 +53,7 @@ The size of an AOT-compiled Blazor WebAssembly app is generally larger than the One of the largest parts of a Blazor WebAssembly app is the WebAssembly-based .NET runtime (`dotnet.wasm`) that the browser must download when the app is first accessed by a user's browser. Relinking the .NET WebAssembly runtime trims unused runtime code and thus improves download speed. -Runtime relinking is performed automatically when you publish an app. The size reduction is particularly dramatic when disabling globalization. For more information, see . +Runtime relinking is performed automatically when you publish an app. The size reduction is particularly dramatic when disabling globalization. For more information, see . For guidance on installing the .NET WebAssembly build tools, see . ## Customize how boot resources are loaded diff --git a/aspnetcore/blazor/tooling.md b/aspnetcore/blazor/tooling.md index 3657d23698..0287f1f177 100644 --- a/aspnetcore/blazor/tooling.md +++ b/aspnetcore/blazor/tooling.md @@ -281,6 +281,19 @@ For more information on template options, see the following resources: * `dotnet new blazorserver -h` * `dotnet new blazorwasm -h` +## .NET WebAssembly build tools + +The **.NET WebAssembly build tools** are based on [Emscripten](https://emscripten.org/), a compiler toolchain for the web platform. To install the **.NET WebAssembly build tools**, use ***either*** of the following approaches: + +* For the **ASP.NET and web development** workload in the Visual Studio installer, select the **.NET WebAssembly build tools** option from the list of optional components. +* Run `dotnet workload install wasm-tools` in a command shell. + +For more information, see the following resources: + +* [Ahead-of-time (AOT) compilation](xref:blazor/host-and-deploy/webassembly#ahead-of-time-aot-compilation) +* [Runtime relinking](xref:blazor/host-and-deploy/webassembly#runtime-relinking) +* + ## Additional resources * @@ -747,4 +760,4 @@ dotnet new blazorserver -h * * -::: moniker-end \ No newline at end of file +::: moniker-end