{"id":320023,"date":"2021-03-22T09:01:02","date_gmt":"2021-03-22T09:01:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=320023"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=320023","title":{"rendered":"Ahead-of-Time \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0438 Blazor"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c8d\/a63\/829\/c8da63829c51ce57cc8115047cce1446.png\" width=\"2316\" height=\"1280\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 .NET 6 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 AOT \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0434\u043b\u044f Blazor WebAssembly \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 Preview 2 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>\u0410\u043d\u043e\u043d\u0441\u0430 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0435\u0442\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u0440\u0435\u0448\u0435\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442.<\/p>\n<h2>\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0430<\/h2>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>Blazor &#8212; Single Page Application \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043e\u0442 \u041c\u0430\u0439\u043a\u0440\u043e\u0441\u043e\u0444\u0442. \u041e\u0442\u043b\u0438\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u0437\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 C#, \u0430 \u043d\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u043d\u0430\u043c JavaScript.<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0435 \u0432\u0435\u0440\u0441\u0438\u0438:<\/p>\n<p><strong>Blazor Server<\/strong>. \u041a\u043e\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0427\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0441\u043e\u043a\u0435\u0442\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JS \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c html \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c AOT \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d.<\/p>\n<p><strong>Blazor WebAssembly.<\/strong> \u0412 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043d\u0430 WebAssembly \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u0435\u0437\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Mono. \u0410 \u0443\u0436\u0435 \u043d\u0430 Mono \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0448\u0435 .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0420\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0421\u0435\u0440\u0432\u0435\u0440 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0434\u0430\u0442\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u043a\u0443.<\/p>\n<p>\u041f\u044b\u0442\u043b\u0438\u0432\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442, \u0447\u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043c\u044b \u0442\u0435\u0440\u044f\u0435\u043c \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438\u0437-\u0437\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0438 WebAssembly-Mono-\u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0418 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0430\u0432! \u0418\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u0438 \u043d\u0443\u0436\u043d\u0430 Ahead-of-Time \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437 .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0440\u0430\u0437\u0443 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u043b\u044f WebAssembly.<\/p>\n<h2>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0443<\/h2>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0448\u0430\u0433 \u0432\u043b\u0435\u0432\u043e, \u0448\u0430\u0433 \u0432\u043f\u0440\u0430\u0432\u043e &#8212; \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0447\u0435\u043c\u0443. \u0415\u0441\u043b\u0438 \u0432\u044b \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0437\u0436\u0435 \u043c\u0430\u0440\u0442\u0430 2021, \u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0431\u043e\u043b\u0435\u0435 \u0441\u0432\u0435\u0436\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438.<\/p>\n<p>\u042f \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u043b \u043d\u0430 Windows. \u0412 \u0442\u0435\u043e\u0440\u0438\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u041e\u0421 \u0442\u043e\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet\/6.0\" rel=\"noopener noreferrer nofollow\">SDK 6.0.100-preview.2<\/a>. \u041f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <a href=\"https:\/\/emscripten.org\/\" rel=\"noopener noreferrer nofollow\">Emscripten<\/a>. \u042d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432 WebAssembly.<\/p>\n<p>\u0428\u0430\u0433\u0438 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/emscripten-core\/emsdk.git cd emsdk emsdk install 2.0.12 emsdk activate 2.0.12 emsdk_env.bat<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0438 \u0432 Environment Variables \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c EMSDK_PATH \u0441 \u043f\u0443\u0442\u0435\u043c \u0434\u043e \u043f\u0430\u043f\u043a\u0438 emsdk.<\/p>\n<p><a href=\"https:\/\/emscripten.org\/docs\/getting_started\/downloads.html#installation-instructions-using-the-emsdk-recommended\" rel=\"noopener noreferrer nofollow\">\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u041e\u0421<\/a>. \u0412\u0435\u0440\u0441\u0438\u044e 2.0.12 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/gist.github.com\/pranavkm\/1ca9eca9605ebc89161cb33e02e74e85\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u043e\u0432\u0435\u0442\u0443<\/a>.<\/p>\n<p>\u0421\u0442\u0430\u0432\u0438\u043c \u043f\u0430\u043a\u0435\u0442 <a href=\"https:\/\/www.nuget.org\/packages\/dotnet-install-blazoraot\/6.0.0-preview.2.21154.6\" rel=\"noopener noreferrer nofollow\">dotnet-install-blazoraot<\/a>. \u042d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442 dotnet \u0438 emscripten.<\/p>\n<pre><code class=\"bash\">dotnet tool install -g dotnet-install-blazoraot --version 6.0.0-* dotnet install-blazoraot<\/code><\/pre>\n<p>\u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0435\u0441\u0442\u044c \u0431\u0430\u0433, \u043e\u043d \u0443\u0436\u0435 \u043f\u043e\u0444\u0438\u043a\u0448\u0435\u043d \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u044b\u043f\u0443\u0449\u0435\u043d. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 C:\\Program Files\\dotnet\\packs\\Microsoft.NET.Runtime.WebAssembly.Sdk\\6.0.0-preview.2.21154.6\\Sdk\\WasmApp.targets \u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 244 \u043d\u0430:<\/p>\n<pre><code class=\"xml\">&lt;Exec Condition=\"'$(WasmLinkIcalls)' == 'true'\" Command=\"&amp;quot;$(MonoAotCrossCompilerPath)&amp;quot; --print-icall-table &gt; $(_WasmIntermediateOutputPath)\/runtime-icall-table.h\" \/&gt;<\/code><\/pre>\n<p>\u0421 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u043e\u0439 \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438. \u041c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"bash\">mkdir myapp cd myapp dotnet new blazorwasm<\/code><\/pre>\n<p>\u0418 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c RunAOTCompilation \u0432 csproj:<\/p>\n<pre><code class=\"xml\">&lt;Project Sdk=\"Microsoft.NET.Sdk.BlazorWebAssembly\"&gt;    &lt;PropertyGroup&gt;     &lt;TargetFramework&gt;net6.0&lt;\/TargetFramework&gt;   &lt;\/PropertyGroup&gt;    &lt;ItemGroup&gt;     &lt;PackageReference           Include=\"Microsoft.AspNetCore.Components.WebAssembly\"           Version=\"6.0.0-preview.2.21154.6\" \/&gt;     &lt;PackageReference           Include=\"Microsoft.AspNetCore.Components.WebAssembly.DevServer\"           Version=\"6.0.0-preview.2.21154.6\" PrivateAssets=\"all\" \/&gt;   &lt;\/ItemGroup&gt;    &lt;PropertyGroup&gt;     &lt;RunAOTCompilation&gt;true&lt;\/RunAOTCompilation&gt;   &lt;\/PropertyGroup&gt; &lt;\/Project&gt;<\/code><\/pre>\n<p>AOT \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"bash\">dotnet publish<\/code><\/pre>\n<h2>\u041f\u0435\u0440\u0432\u044b\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u044f<\/h2>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u041d\u0435\u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442. \u0410 \u0432\u043e\u0442 \u043e\u0434\u0438\u043d \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0443 \u043c\u0435\u043d\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0447\u0430\u0441\u0430.<\/p>\n<p>\u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 dotnet.wasm \u0444\u0430\u0439\u043b \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f 15 \u043c\u0431. \u042f \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u0438 50 \u0438 60 \u043c\u0431. \u042d\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e.<\/p>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043b\u0438\u043a\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442, \u043d\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0441\u044b\u043f\u044f\u0442 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438. \u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0447\u0435\u043c\u0443. \u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c \ud83d\ude42<\/p>\n<p>\u041d\u041e! \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<p>\u042f \u0441\u0434\u0435\u043b\u0430\u043b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447: \u043f\u043e\u0438\u0441\u043a \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430. \u0421 AOT \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0432 3 \u0440\u0430\u0437\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438!<\/p>\n<p>\u0414\u043b\u044f \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u2192 <a href=\"https:\/\/aot-blazor.github.io\/aot\/\" rel=\"noopener noreferrer nofollow\">\u0412\u0435\u0440\u0441\u0438\u044f \u0441 AOT<\/a><\/p>\n<p>\u2192 <a href=\"https:\/\/aot-blazor.github.io\/noaot\/\" rel=\"noopener noreferrer nofollow\">\u0412\u0435\u0440\u0441\u0438\u044f \u0431\u0435\u0437 AOT<\/a><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0427\u0443\u0434\u0430 \u043d\u0435 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u041f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u044e\u0449\u0438\u0439\u0441\u044f \u043a\u043e\u0434 \ud83d\ude42<\/p>\n<p>\u0412\u0441\u044f \u044d\u0442\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0435\u0449\u0435 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0443\u0442\u0438. \u0412 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0435 \u043f\u043e\u043b\u0433\u043e\u0434\u0430, \u0434\u0443\u043c\u0430\u044e, \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043b\u0435\u0433\u043a\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041d\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0443\u0434\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u0438 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/548132\/\"> https:\/\/habr.com\/ru\/post\/548132\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 .NET 6 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 AOT \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0434\u043b\u044f Blazor WebAssembly \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 Preview 2 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>\u0410\u043d\u043e\u043d\u0441\u0430 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0435\u0442\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u0440\u0435\u0448\u0435\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442.<\/p>\n<h2>\u041a\u0440\u0430\u0442\u043a\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0430<\/h2>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>Blazor &#8212; Single Page Application \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043e\u0442 \u041c\u0430\u0439\u043a\u0440\u043e\u0441\u043e\u0444\u0442. \u041e\u0442\u043b\u0438\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u0437\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 C#, \u0430 \u043d\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u043d\u0430\u043c JavaScript.<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0435 \u0432\u0435\u0440\u0441\u0438\u0438:<\/p>\n<p><strong>Blazor Server<\/strong>. \u041a\u043e\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0427\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0441\u043e\u043a\u0435\u0442\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JS \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c html \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c AOT \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d.<\/p>\n<p><strong>Blazor WebAssembly.<\/strong> \u0412 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043d\u0430 WebAssembly \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u0435\u0437\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Mono. \u0410 \u0443\u0436\u0435 \u043d\u0430 Mono \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0448\u0435 .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0420\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0421\u0435\u0440\u0432\u0435\u0440 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0434\u0430\u0442\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u043a\u0443.<\/p>\n<p>\u041f\u044b\u0442\u043b\u0438\u0432\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442, \u0447\u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043c\u044b \u0442\u0435\u0440\u044f\u0435\u043c \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438\u0437-\u0437\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0438 WebAssembly-Mono-\u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0418 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0430\u0432! \u0418\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u0438 \u043d\u0443\u0436\u043d\u0430 Ahead-of-Time \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437 .NET \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0440\u0430\u0437\u0443 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u043b\u044f WebAssembly.<\/p>\n<h2>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0443<\/h2>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0448\u0430\u0433 \u0432\u043b\u0435\u0432\u043e, \u0448\u0430\u0433 \u0432\u043f\u0440\u0430\u0432\u043e &#8212; \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0447\u0435\u043c\u0443. \u0415\u0441\u043b\u0438 \u0432\u044b \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0437\u0436\u0435 \u043c\u0430\u0440\u0442\u0430 2021, \u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0431\u043e\u043b\u0435\u0435 \u0441\u0432\u0435\u0436\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438.<\/p>\n<p>\u042f \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u043b \u043d\u0430 Windows. \u0412 \u0442\u0435\u043e\u0440\u0438\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u041e\u0421 \u0442\u043e\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet\/6.0\" rel=\"noopener noreferrer nofollow\">SDK 6.0.100-preview.2<\/a>. \u041f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <a href=\"https:\/\/emscripten.org\/\" rel=\"noopener noreferrer nofollow\">Emscripten<\/a>. \u042d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432 WebAssembly.<\/p>\n<p>\u0428\u0430\u0433\u0438 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/emscripten-core\/emsdk.git cd emsdk emsdk install 2.0.12 emsdk activate 2.0.12 emsdk_env.bat<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0438 \u0432 Environment Variables \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c EMSDK_PATH \u0441 \u043f\u0443\u0442\u0435\u043c \u0434\u043e \u043f\u0430\u043f\u043a\u0438 emsdk.<\/p>\n<p><a href=\"https:\/\/emscripten.org\/docs\/getting_started\/downloads.html#installation-instructions-using-the-emsdk-recommended\" rel=\"noopener noreferrer nofollow\">\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u041e\u0421<\/a>. \u0412\u0435\u0440\u0441\u0438\u044e 2.0.12 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/gist.github.com\/pranavkm\/1ca9eca9605ebc89161cb33e02e74e85\" rel=\"noopener noreferrer nofollow\">\u043f\u043e \u0441\u043e\u0432\u0435\u0442\u0443<\/a>.<\/p>\n<p>\u0421\u0442\u0430\u0432\u0438\u043c \u043f\u0430\u043a\u0435\u0442 <a href=\"https:\/\/www.nuget.org\/packages\/dotnet-install-blazoraot\/6.0.0-preview.2.21154.6\" rel=\"noopener noreferrer nofollow\">dotnet-install-blazoraot<\/a>. \u042d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442 dotnet \u0438 emscripten.<\/p>\n<pre><code class=\"bash\">dotnet tool install -g dotnet-install-blazoraot --version 6.0.0-* dotnet install-blazoraot<\/code><\/pre>\n<p>\u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0435\u0441\u0442\u044c \u0431\u0430\u0433, \u043e\u043d \u0443\u0436\u0435 \u043f\u043e\u0444\u0438\u043a\u0448\u0435\u043d \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u044b\u043f\u0443\u0449\u0435\u043d. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 C:\\Program Files\\dotnet\\packs\\Microsoft.NET.Runtime.WebAssembly.Sdk\\6.0.0-preview.2.21154.6\\Sdk\\WasmApp.targets \u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 244 \u043d\u0430:<\/p>\n<pre><code class=\"xml\">&lt;Exec Condition=\"'$(WasmLinkIcalls)' == 'true'\" Command=\"&amp;quot;$(MonoAotCrossCompilerPath)&amp;quot; --print-icall-table &gt; $(_WasmIntermediateOutputPath)\/runtime-icall-table.h\" \/&gt;<\/code><\/pre>\n<p>\u0421 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u043e\u0439 \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438. \u041c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"bash\">mkdir myapp cd myapp dotnet new blazorwasm<\/code><\/pre>\n<p>\u0418 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c RunAOTCompilation \u0432 csproj:<\/p>\n<pre><code class=\"xml\">&lt;Project Sdk=\"Microsoft.NET.Sdk.BlazorWebAssembly\"&gt;    &lt;PropertyGroup&gt;     &lt;TargetFramework&gt;net6.0&lt;\/TargetFramework&gt;   &lt;\/PropertyGroup&gt;    &lt;ItemGroup&gt;     &lt;PackageReference           Include=\"Microsoft.AspNetCore.Components.WebAssembly\"           Version=\"6.0.0-preview.2.21154.6\" \/&gt;     &lt;PackageReference           Include=\"Microsoft.AspNetCore.Components.WebAssembly.DevServer\"           Version=\"6.0.0-preview.2.21154.6\" PrivateAssets=\"all\" \/&gt;   &lt;\/ItemGroup&gt;    &lt;PropertyGroup&gt;     &lt;RunAOTCompilation&gt;true&lt;\/RunAOTCompilation&gt;   &lt;\/PropertyGroup&gt; &lt;\/Project&gt;<\/code><\/pre>\n<p>AOT \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"bash\">dotnet publish<\/code><\/pre>\n<h2>\u041f\u0435\u0440\u0432\u044b\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u044f<\/h2>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u041d\u0435\u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442. \u0410 \u0432\u043e\u0442 \u043e\u0434\u0438\u043d \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0443 \u043c\u0435\u043d\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0447\u0430\u0441\u0430.<\/p>\n<p>\u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 dotnet.wasm \u0444\u0430\u0439\u043b \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f 15 \u043c\u0431. \u042f \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u0438 50 \u0438 60 \u043c\u0431. \u042d\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e.<\/p>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043b\u0438\u043a\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442, \u043d\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0441\u044b\u043f\u044f\u0442 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438. \u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0447\u0435\u043c\u0443. \u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c \ud83d\ude42<\/p>\n<p>\u041d\u041e! \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<p>\u042f \u0441\u0434\u0435\u043b\u0430\u043b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447: \u043f\u043e\u0438\u0441\u043a \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430. \u0421 AOT \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0432 3 \u0440\u0430\u0437\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438!<\/p>\n<p>\u0414\u043b\u044f \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u2192 <a href=\"https:\/\/aot-blazor.github.io\/aot\/\" rel=\"noopener noreferrer nofollow\">\u0412\u0435\u0440\u0441\u0438\u044f \u0441 AOT<\/a><\/p>\n<p>\u2192 <a href=\"https:\/\/aot-blazor.github.io\/noaot\/\" rel=\"noopener noreferrer nofollow\">\u0412\u0435\u0440\u0441\u0438\u044f \u0431\u0435\u0437 AOT<\/a><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0427\u0443\u0434\u0430 \u043d\u0435 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u041f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u044e\u0449\u0438\u0439\u0441\u044f \u043a\u043e\u0434 \ud83d\ude42<\/p>\n<p>\u0412\u0441\u044f \u044d\u0442\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0435\u0449\u0435 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0443\u0442\u0438. \u0412 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0435 \u043f\u043e\u043b\u0433\u043e\u0434\u0430, \u0434\u0443\u043c\u0430\u044e, \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043b\u0435\u0433\u043a\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>\u041d\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0443\u0434\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u0438 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/548132\/\"> https:\/\/habr.com\/ru\/post\/548132\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-320023","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=320023"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320023\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}