1
0
mirror of https://github.com/bitwarden/server synced 2025-12-12 14:23:38 +00:00
Files
server/util/RustSdk/RustSdk.csproj
2025-10-09 15:00:35 -07:00

38 lines
1.3 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Bit.RustSDK</RootNamespace>
<UserSecretsId>Bit.RustSDK</UserSecretsId>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Content Include="rust/target/release/libsdk.dylib">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
<Link>runtimes/osx-arm64/native/libsdk.dylib</Link>
</Content>
<Content Include="./rust/target/release/libsdk.so">
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<Content Include="./rust/target/release/libsdk.dll">
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
<!-- This is a work around because this file is compiled by the PreBuild event below, and won't
always be detected -->
<Compile Remove="NativeMethods.g.cs" />
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="cargo build --release" WorkingDirectory="$(ProjectDir)/rust" />
<ItemGroup>
<Compile Include="NativeMethods.g.cs" />
</ItemGroup>
</Target>
</Project>