2024-11-05 20:10:19 +00:00
|
|
|
|
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
|
<OutputType>Library</OutputType>
|
|
|
|
|
<TargetFramework>net9.0</TargetFramework>
|
|
|
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
|
|
|
<Nullable>enable</Nullable>
|
|
|
|
|
|
|
|
|
|
<RuntimeIdentifier>wasi-wasm</RuntimeIdentifier>
|
|
|
|
|
<UseAppHost>false</UseAppHost>
|
|
|
|
|
<PublishTrimmed>true</PublishTrimmed>
|
|
|
|
|
<InvariantGlobalization>true</InvariantGlobalization>
|
|
|
|
|
<SelfContained>true</SelfContained>
|
|
|
|
|
<IlcExportUnmanagedEntrypoints>true</IlcExportUnmanagedEntrypoints>
|
2024-11-09 02:05:02 +00:00
|
|
|
|
|
|
|
|
|
<!-- Ignore warning of multiple `PackageReference` items for the `ILCompiler.LLVM` package. -->
|
|
|
|
|
<NoWarn>$(NoWarn);NU1504</NoWarn>
|
2024-11-05 20:10:19 +00:00
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
2024-11-08 03:57:31 +00:00
|
|
|
|
<!-- Copy WIT files from LyraApi to lyra-api wit folder. -->
|
2024-11-12 23:57:46 +00:00
|
|
|
|
<Target Name="CopyLyraApiWit" BeforeTargets="WitCompile_InvokeTool">
|
2024-11-08 00:28:35 +00:00
|
|
|
|
<ItemGroup>
|
2024-11-10 00:13:15 +00:00
|
|
|
|
<MyFiles Include="..\..\rust\common-api\wit\**\*.wit" />
|
2024-11-08 00:28:35 +00:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
<Copy SourceFiles="@(MyFiles)" DestinationFolder="wit\deps\lyraapi\%(RecursiveDir)" />
|
2024-11-10 00:13:15 +00:00
|
|
|
|
</Target>
|
2024-11-07 02:26:03 +00:00
|
|
|
|
|
2024-11-12 23:57:46 +00:00
|
|
|
|
<Target Name="CopyComponentGuestWit" BeforeTargets="WitCompile_InvokeTool">
|
|
|
|
|
<Copy SourceFiles="..\..\rust\witguest\wit\world.wit" DestinationFiles="wit\world.wit" />
|
|
|
|
|
</Target>
|
|
|
|
|
|
2024-11-08 03:57:31 +00:00
|
|
|
|
<!-- Remove bindgen of LyraApi WIT .-->
|
2024-11-09 02:05:02 +00:00
|
|
|
|
<!-- <Target Name="RemoveBindgenLyraApi" AfterTargets="WitCompile_InvokeTool">
|
2024-11-08 03:57:31 +00:00
|
|
|
|
<ItemGroup>
|
|
|
|
|
<FilesToDelete Include="obj\Debug\net*\wasi-wasm\wit_bindgen\*.lyra.api.*.cs"/>
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
<Delete Files="@(FilesToDelete)" />
|
2024-11-09 02:05:02 +00:00
|
|
|
|
</Target> -->
|
2024-11-08 03:57:31 +00:00
|
|
|
|
|
|
|
|
|
<!-- Reuse bindgen from LyraApi package instead of using local bindgen. -->
|
2024-11-09 02:05:02 +00:00
|
|
|
|
<!-- <Target Name="UpdateLyraApiReferences" AfterTargets="WitCompile_InvokeTool; RemoveBindgenLyraApi">
|
2024-11-08 03:57:31 +00:00
|
|
|
|
<Exec Condition="'$(OS)' == 'Unix'" Command="find obj/Debug -type f -wholename '*wit_bindgen/*.cs' -exec sed -i 's/ExampleWorld\.wit\.imports\.lyra\.api/ImportsWorld.wit.imports.lyra.api/g' {} \;" />
|
|
|
|
|
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="powershell -Command "Get-ChildItem -Path 'obj\Debug' -Recurse -Filter '*.cs' ^
|
|
|
|
|
| Where-Object { $_.FullName -match 'wit_bindgen' } ^
|
|
|
|
|
| ForEach-Object { (Get-Content -Path $_.FullName) -replace 'ExampleWorld\.wit\.imports\.lyra\.api', 'ImportsWorld.wit.imports.lyra.api' ^
|
|
|
|
|
| Set-Content -Path $_.FullName }"" />
|
2024-11-09 02:05:02 +00:00
|
|
|
|
</Target> -->
|
2024-11-08 03:57:31 +00:00
|
|
|
|
|
2024-11-05 20:10:19 +00:00
|
|
|
|
<ItemGroup>
|
2024-11-07 02:26:03 +00:00
|
|
|
|
<PackageReference Include="BytecodeAlliance.Componentize.DotNet.Wasm.SDK" Version="0.4.0-preview00007" />
|
2024-11-09 02:05:02 +00:00
|
|
|
|
<PackageReference Include="runtime.linux-x64.Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-alpha.1.24531.4" />
|
2024-11-05 20:10:19 +00:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
2024-11-07 02:26:03 +00:00
|
|
|
|
<Wit Remove="**\*.wit" />
|
|
|
|
|
<Wit Include="wit" World="example" />
|
2024-11-05 20:10:19 +00:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
2024-11-09 02:05:02 +00:00
|
|
|
|
<!-- <ItemGroup>
|
2024-11-08 00:28:35 +00:00
|
|
|
|
<ProjectReference Include="..\LyraApi\LyraApi.csproj" />
|
2024-11-09 02:05:02 +00:00
|
|
|
|
</ItemGroup> -->
|
2024-11-05 20:10:19 +00:00
|
|
|
|
</Project>
|