Skip to content

refactor: hide egl code behind feature in libwayshot#320

Merged
Gigas002 merged 7 commits into
waycrate:mainfrom
Gigas002:feature/egl-feat
Mar 27, 2026
Merged

refactor: hide egl code behind feature in libwayshot#320
Gigas002 merged 7 commits into
waycrate:mainfrom
Gigas002:feature/egl-feat

Conversation

@Gigas002
Copy link
Copy Markdown
Collaborator

This PR hides egl-related code in libwayshot behind feature (enabled by default).
This may seem useless at the moment, but this is part of further refactoring before implementing optional vulkan support. I've been testing and using it in my fork for ~2 weeks and things are looking good.

Breaking changes

While this is not breaking for most users, default-features = false users will lose egl support. Migration step is to add feature, e.g. libwayshot = { version = "...", default-features = false, features = ["png", "egl"] }.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 0% with 91 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.66%. Comparing base (0e3e91f) to head (270cde1).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
libwayshot/src/egl.rs 0.00% 80 Missing ⚠️
libwayshot/src/lib.rs 0.00% 6 Missing ⚠️
libwayshot/src/screencast.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #320      +/-   ##
==========================================
+ Coverage   17.63%   17.66%   +0.02%     
==========================================
  Files          19       20       +1     
  Lines        2988     2983       -5     
==========================================
  Hits          527      527              
+ Misses       2461     2456       -5     
Flag Coverage Δ
libwayshot 22.24% <0.00%> (+0.04%) ⬆️
wayshot 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Gigas002 Gigas002 marked this pull request as ready for review March 26, 2026 14:43
@Gigas002
Copy link
Copy Markdown
Collaborator Author

Hmm, probably we don't even need it as default feature in cli...

@Gigas002 Gigas002 marked this pull request as draft March 27, 2026 00:15
Decodetalkers
Decodetalkers previously approved these changes Mar 27, 2026
@Decodetalkers Decodetalkers self-requested a review March 27, 2026 00:16
@Decodetalkers
Copy link
Copy Markdown
Collaborator

oh.. sorry, this is just a draft. I should not approve it now

@Gigas002
Copy link
Copy Markdown
Collaborator Author

Yeah, my bad. I've opened it yesterday, but now I thought that maybe we don't need that feature on by default in cli, since we don't use egl on it to capture screenshot anyway

@Gigas002
Copy link
Copy Markdown
Collaborator Author

@Decodetalkers
Sorry, I've removed the egl feat from wayshot cli. Can you please re-review when you're free?
Thank you!

@Gigas002 Gigas002 marked this pull request as ready for review March 27, 2026 03:59
@Gigas002 Gigas002 merged commit 53b5799 into waycrate:main Mar 27, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants