Skip to content

Conversation

@Stephanvs
Copy link
Owner

Summary

This change makes hypr build as a truly self-contained single binary that doesn't require the .NET runtime to be installed on target machines.

What changed

  • Added native library embedding via IncludeNativeLibrariesForSelfExtract to bundle LibGit2Sharp's native libraries into the single executable
  • Removed Scrutor dependency and replaced reflection-based assembly scanning with explicit command registration for trim compatibility
  • Refactored command registration into a dedicated AddCommands() method for better code organization
  • Added ARM Linux support to the release matrix (linux-arm64)

Result

  • Single ~15MB binary that runs without .NET runtime
  • Trim & AOT compatible for future optimizations
  • All platforms covered: Linux x64/ARM64, Windows x64, macOS x64/ARM64
  • Cleaner dependency injection setup without reflection overhead

Verification

dotnet publish src/hypr.csproj -c Release -r linux-x64
./publish/linux-x64/hypr  # Runs on systems without .NET installed

- Add IncludeNativeLibrariesForSelfExtract to embed LibGit2Sharp native libraries
- Remove Scrutor dependency, replace with explicit command registration
- Refactor command registration into AddCommands() method for better organization
- Add linux-arm64 to release matrix for ARM Linux support

Now hypr builds as a single ~15MB binary that runs without .NET runtime
installed on target machines.
- Keep explicit command registration for trimming compatibility
- Add Scrutor back for terminal provider discovery
- Merge main's terminal provider architecture
@Stephanvs Stephanvs merged commit 7263e09 into main Jan 14, 2026
4 checks passed
@Stephanvs Stephanvs added the enhancement New feature or request label Jan 14, 2026
@Stephanvs
Copy link
Owner Author

✅ All checks passing. Ready for merge!

This PR enables truly self-contained single binary builds:

  • Native library embedding for LibGit2Sharp
  • Explicit command registration for trim compatibility
  • ARM Linux support added to release matrix
  • Terminal provider architecture properly merged

Binary is now ~15MB and runs without .NET runtime on target systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants