-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathHyperlightSandbox.Guest.JavaScript.csproj
More file actions
60 lines (53 loc) · 2.88 KB
/
HyperlightSandbox.Guest.JavaScript.csproj
File metadata and controls
60 lines (53 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AnalysisMode>All</AnalysisMode>
<AnalysisLevel>latest</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<RootNamespace>HyperlightSandbox.Guest.JavaScript</RootNamespace>
<!-- NuGet Package Metadata -->
<PackageId>Hyperlight.HyperlightSandbox.Guest.JavaScript</PackageId>
<Description>JavaScript guest module package for hyperlight-sandbox. Bundles the prebuilt JavaScript AOT guest and provides SandboxBuilder.WithJavaScriptModule().</Description>
<PackageTags>hyperlight;sandbox;javascript;guest;module</PackageTags>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/hyperlight-dev/hyperlight-sandbox</PackageProjectUrl>
<RepositoryUrl>https://github.com/hyperlight-dev/hyperlight-sandbox</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>
<PropertyGroup>
<WorkspaceRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)../../../../..'))</WorkspaceRoot>
<JavaScriptGuestDir>$([System.IO.Path]::Combine('$(WorkspaceRoot)', 'src', 'wasm_sandbox', 'guests', 'javascript'))</JavaScriptGuestDir>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Api\HyperlightSandbox.Api.csproj" />
</ItemGroup>
<!--
Native assets following the NuGet runtimes/{rid}/native/ convention (same as PInvoke).
The .aot file is Hyperlight/Cranelift AOT output: architecture-specific but NOT OS-specific,
so the same binary serves both linux-x64 and win-x64. Include it under both RID folders so
NuGet selects the right entry for each consumer platform from a single package build.
-->
<ItemGroup>
<None Include="$(JavaScriptGuestDir)/js-sandbox.aot"
Condition="Exists('$(JavaScriptGuestDir)/js-sandbox.aot')">
<Pack>true</Pack>
<PackagePath>runtimes/linux-x64/native/</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>runtimes/linux-x64/native/js-sandbox.aot</Link>
</None>
<None Include="$(JavaScriptGuestDir)/js-sandbox.aot"
Condition="Exists('$(JavaScriptGuestDir)/js-sandbox.aot')">
<Pack>true</Pack>
<PackagePath>runtimes/win-x64/native/</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>runtimes/win-x64/native/js-sandbox.aot</Link>
</None>
</ItemGroup>
<Target Name="ValidateJavaScriptGuestResources" BeforeTargets="Pack">
<Error Condition="!Exists('$(JavaScriptGuestDir)/js-sandbox.aot')"
Text="JavaScript guest AOT binary is missing. Run 'just wasm js-guest-build' before packing Hyperlight.HyperlightSandbox.Guest.JavaScript." />
</Target>
</Project>