Skip to content

Conversation

@sungshik
Copy link
Contributor

@sungshik sungshik commented Jul 16, 2025

This PR replaces the JNA based implementation with a rust based implementation. This reduces our dependencies (fixing #58) and allows us to improve the performance in future PRs by moving some logic to the rust side.

@codecov
Copy link

codecov bot commented Jul 16, 2025

Codecov Report

❌ Patch coverage is 57.14286% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.9%. Comparing base (f8276de) to head (9ee1391).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
...engineering/swat/watch/impl/mac/NativeLibrary.java 38.2% 15 Missing and 6 partials ⚠️
...eering/swat/watch/impl/mac/NativeEventHandler.java 88.2% 0 Missing and 2 partials ⚠️
...ava/engineering/swat/watch/impl/jdk/JDKPoller.java 0.0% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              main     #61      +/-   ##
==========================================
+ Coverage     60.4%   77.9%   +17.5%     
- Complexity     147     171      +24     
==========================================
  Files           26      23       -3     
  Lines          812     768      -44     
  Branches        92      89       -3     
==========================================
+ Hits           491     599     +108     
+ Misses         270     106     -164     
- Partials        51      63      +12     

☔ 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.

@sungshik sungshik force-pushed the feat/use-rust-and-jni-on-mac-wip branch from 6ea1016 to f8276de Compare July 16, 2025 16:01
@sungshik sungshik changed the title Feat/use rust and jni on mac wip WIP: Using JNI+Rust instead of JNA on macOS Jul 16, 2025
Copy link
Member

@DavyLandman DavyLandman left a comment

Choose a reason for hiding this comment

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

Some small things to update, but looks good.

distribution: 'temurin'
cache: 'maven'
#- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: ./update-rust-jni-libs.sh
Copy link
Member

Choose a reason for hiding this comment

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

todo: we should publish these libs in a way that it's available for the release build of the maven lib.

or maybe just run maven package on a osx runner.

@DavyLandman DavyLandman marked this pull request as ready for review August 13, 2025 12:12
Copy link
Member

@DavyLandman DavyLandman left a comment

Choose a reason for hiding this comment

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

This looks good, thanks @sungshik for picking it up and finishing it.

@DavyLandman DavyLandman enabled auto-merge August 13, 2025 12:23
@DavyLandman DavyLandman merged commit 3435479 into main Aug 13, 2025
19 checks passed
@DavyLandman DavyLandman deleted the feat/use-rust-and-jni-on-mac-wip branch August 13, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants