chore: more flags compatibility
This commit is contained in:
Родитель
428f51726d
Коммит
d57d39da11
|
@ -4,12 +4,20 @@ uid: UnoWasmBootstrap.Overview
|
|||
|
||||
# Using the bootstrapper
|
||||
|
||||
The Uno.Wasm.Bootstrap provides a base bootstrapping of the Microsoft.NET.Sdk.WebAssembly SDK provided by .NET 9.
|
||||
The Uno.Wasm.Bootstrap provides a base bootstrapping of the `Microsoft.NET.Sdk.WebAssembly` SDK provided by .NET 9.
|
||||
|
||||
This package only provides the bootstrapping features to run a .NET assembly and write to the javascript console, through `Console.WriteLine`. To write an app that provides UI functionalities, make sur to check out https://aka.platform.uno/get-started.
|
||||
|
||||
This work is based on the excellent work from @praeclarum's [OOui Wasm MSBuild task](https://github.com/praeclarum/Ooui).
|
||||
|
||||
## Prepare your machine
|
||||
|
||||
On the command line, type the following to install the WebAssembly workload:
|
||||
|
||||
```bash
|
||||
dotnet workload install wasm-tools
|
||||
```
|
||||
|
||||
## How to use the Bootstrapper with .NET 9 and later
|
||||
|
||||
- Create a .NET 9 Console Application, and update it with the following basic definition:
|
||||
|
@ -77,7 +85,7 @@ You application will be available `http://localhost:8000`.
|
|||
|
||||
## Upgrading from previous versions of the Uno.Wasm.Bootstrap package
|
||||
|
||||
Moving from version 8.x to 9.x may require changing the used msbuild SDK for your project.
|
||||
Moving from version 8.x to 9.x may require changing the used MSBuild SDK for your project.
|
||||
|
||||
- If your project contains `Sdk="Uno.Sdk"`, you will need to update the Uno.Sdk to 5.5 or later.
|
||||
- If your project contains `Sdk="Microsoft.NET.Sdk.Web"`, you'll need to change it to `Sdk="Microsoft.NET.Sdk.WebAssembly"`.
|
||||
|
@ -96,6 +104,25 @@ By default, the .NET runtime does not load all resource assemblies, but if you w
|
|||
</PropertyGroup>
|
||||
```
|
||||
|
||||
### Deprecated APIs
|
||||
|
||||
- The `Uno.Wasm.Boostrap.DevServer` package is not needed anymore and can be removed
|
||||
- `WasmShellOutputPackagePath` has been removed. Use `$(PublishDir)`
|
||||
- `WasmShellOutputDistPath` has been removed. Use `$(PublishDir)`
|
||||
- `WasmShellBrotliCompressionQuality`, `WasmShellCompressedExtension` and `WasmShellGenerateCompressedFiles` have been removed, the compression is done by the .NET SDK
|
||||
- `WasmShellEnableAotGSharedVT` has been removed.
|
||||
- `WasmShellEnableEmscriptenWindows` has been removed, the .NET SDK manages emscripten
|
||||
- `WasmShellEnableLongPathSupport` has been removed, the .NET SDK manages the build
|
||||
- `WasmShellEnableNetCoreICU`has been removed, the .NET SDK manages localization
|
||||
- `WasmShellForceDisableWSL` and `WasmShellForceUseWSL` have been removed, Windows and Linux are supported natively by the .NET SDK.
|
||||
- `WashShellGeneratePrefetchHeaders` has been removed.
|
||||
- `WasmShellNinjaAdditionalParameters` has been removed, the .NET SDK manages the build
|
||||
- `WasmShellObfuscateAssemblies`, `WasmShellAssembliesExtension` and `AssembliesFileNameObfuscationMode` have been removed, the .NET SDK uses WebCIL to achieve the same result.
|
||||
- `WasmShellPrintAOTSkippedMethods` has been removed
|
||||
- `WasmShellPThreadsPoolSize` has been removed in favor of the official .NET SDK parameters
|
||||
- `MonoRuntimeDebuggerEnabled` has been removed, the .NET SDK manages the debugger
|
||||
- `WashShellUseFileIntegrity` has been removed, the .NET SDK manages the assets integrity
|
||||
|
||||
## Bootstrapper versions and .NET runtimes
|
||||
|
||||
Each major version of the bootstrapper targets a different version of the .NET Runtime.
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
// ******************************************************************
|
||||
// Copyright <20> 2015-2022 Uno Platform inc. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// ******************************************************************
|
||||
//
|
||||
// This file is based on the work from https://github.com/praeclarum/Ooui
|
||||
//
|
||||
|
||||
namespace Uno.Wasm.Bootstrap
|
||||
{
|
||||
enum LinkOptimizationLevel
|
||||
{
|
||||
None,
|
||||
Level1,
|
||||
Level2,
|
||||
Level3,
|
||||
Maximum,
|
||||
}
|
||||
}
|
|
@ -150,19 +150,36 @@
|
|||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- SIMD compatibility-->
|
||||
<WasmEnableSIMD Condition=" '$(WasmShellEnableSimd)' != '' ">$(WasmShellEnableSimd)</WasmEnableSIMD>
|
||||
|
||||
<!-- Dedup compatibility -->
|
||||
<WasmDedup Condition=" '$(WasmShellEnableAOTDeduplication)' != '' ">$(WasmShellEnableAOTDeduplication)</WasmDedup>
|
||||
|
||||
<!-- Linker performance compatibility -->
|
||||
<WasmLinkOptimizationFlag Condition=" '$(WasmShellEmccLinkOptimizationLevel)' == 'None' ">-O0</WasmLinkOptimizationFlag>
|
||||
<WasmLinkOptimizationFlag Condition=" '$(WasmShellEmccLinkOptimizationLevel)' == 'Leve1' ">-O1</WasmLinkOptimizationFlag>
|
||||
<WasmLinkOptimizationFlag Condition=" '$(WasmShellEmccLinkOptimizationLevel)' == 'Level2' ">-O2</WasmLinkOptimizationFlag>
|
||||
<WasmLinkOptimizationFlag Condition=" '$(WasmShellEmccLinkOptimizationLevel)' == 'Level3' ">-O3</WasmLinkOptimizationFlag>
|
||||
<WasmLinkOptimizationFlag Condition=" '$(WasmShellEmccLinkOptimizationLevel)' == 'Maximum' ">-Oz</WasmLinkOptimizationFlag>
|
||||
|
||||
<WasmLinkOptimizationFlag Condition=" '$(WasmShellEmccLinkOptimization)' == 'false' ">-O0</WasmLinkOptimizationFlag>
|
||||
|
||||
<!-- Jiterpreter compatibility -->
|
||||
<BlazorWebAssemblyJiterpreter Condition=" '$(WasmShellEnableJiterpreter)' != '' AND '$(BlazorWebAssemblyJiterpreter)' == '' ">$(WasmShellEnableJiterpreter)</BlazorWebAssemblyJiterpreter>
|
||||
|
||||
<!-- EMCC flags compatibility -->
|
||||
<EmccFlags>$(EmccFlags);@(WasmShellExtraEmccFlags)</EmccFlags>
|
||||
|
||||
<EmccFlags Condition=" '$(WasmShellEnableEmccProfiling)' == 'true' ">$(EmccFlags);--profiling</EmccFlags>
|
||||
|
||||
<!-- Threading compatibility -->
|
||||
<WasmEnableThreads Condition=" '$(WasmShellEnableThreads)' == 'true' ">true</WasmEnableThreads>
|
||||
|
||||
<!-- https://github.com/dotnet/runtime/blob/1231a9addd0fb3cfb806c2a89cb45a3018c48bb2/src/mono/browser/build/BrowserWasmApp.targets#L125-L126 -->
|
||||
<_WasmPThreadPoolInitialSize Condition=" '$(WasmShellPThreadsPoolSize)' == 'true' ">true</_WasmPThreadPoolInitialSize>
|
||||
|
||||
<!-- Native build compatibility -->
|
||||
<WasmBuildNative Condition="
|
||||
@(WasmShellAdditionalPInvokeLibrary->Count()) > 0
|
||||
OR @(NativeFileReference->Count()) > 0
|
||||
|
|
Загрузка…
Ссылка в новой задаче