Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C#: Split debug and release Rust compilation. #1202

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

nihohit
Copy link
Contributor

@nihohit nihohit commented Apr 1, 2024

Before this change, Rust was always compiled in release mode. This allows tests to compile in debug mode, which cuts the compilation time from ~1:20 minutes to 0:30.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@nihohit nihohit requested a review from a team as a code owner April 1, 2024 08:36
@shachlanAmazon
Copy link
Contributor

@Sa1Gur

@Yury-Fridlyand Yury-Fridlyand added the C# C# wrapper label Apr 1, 2024
</Target>

<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)target/release/libglide_rs.dll" Condition="$([MSBuild]::IsOSPlatform('Windows'))">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use path $(MSBuildThisFileDirectory)target/$(Configuration.ToLower())/glide_rs.dll to have less branches

<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>%(FileName)%(Extension)</Link>
</Content>
<Content Include="$(MSBuildThisFileDirectory)target/release/libglide_rs.so" Condition="$([MSBuild]::IsOSPlatform('Linux')) And '$(Configuration)' == 'Release'">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use $(MSBuildThisFileDirectory)target/$(Configuration.ToLower())/libglide_rs.so here

<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>%(FileName)%(Extension)</Link>
</Content>
<Content Include="$(MSBuildThisFileDirectory)target/release/libglide_rs.dylib" Condition="$([MSBuild]::IsOSPlatform('OSX')) And '$(Configuration)' == 'Release'">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use $(MSBuildThisFileDirectory)target/$(Configuration.ToLower())/libglide_rs.dylib here

Before this change, Rust was always compiled in release mode. This allows tests to compile in debug mode, which cuts the compilation time from ~1:20 minutes to 0:30.
@shachlanAmazon shachlanAmazon merged commit 8971be6 into valkey-io:main Apr 2, 2024
8 of 10 checks passed
shohamazon pushed a commit to adanWattad/glide-for-redis that referenced this pull request Apr 9, 2024
Before this change, Rust was always compiled in release mode. This allows tests to compile in debug mode, which cuts the compilation time from ~1:20 minutes to 0:30.
cyip10 pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 24, 2024
Before this change, Rust was always compiled in release mode. This allows tests to compile in debug mode, which cuts the compilation time from ~1:20 minutes to 0:30.
@nihohit nihohit deleted the csharp-debug branch January 9, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C# C# wrapper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants