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

Refactor Java Bindings to a Gradle Project #77

Merged
merged 7 commits into from
Jun 27, 2024
Merged

Refactor Java Bindings to a Gradle Project #77

merged 7 commits into from
Jun 27, 2024

Conversation

tareknaser
Copy link
Collaborator

@tareknaser tareknaser commented Jun 24, 2024

Description

This PR refactors the Java bindings of ark Rust codebase into a standalone Gradle project.

Changes

  • Created a Gradle project dev.arkbuilders.core.
  • Configured Gradle to include Rust compiled dynamic libraries for straightforward building.
  • Moved SyncStatus to be part of FileStorage instead of a standalone class.
  • Added JavaDoc comments for each public class/method.
  • Added documentation for the bindings.
  • Updated CI workflows.

…nk Rust libraries

- Moved Java bindings code into a separate subdirectory for better organization.
- Converted the subdirectory into a standalone Java Gradle project.
- Updated the build configuration to dynamically link the Rust libraries from the release target.

Signed-off-by: Tarek <tareknaser360@gmail.com>
Signed-off-by: Tarek <tareknaser360@gmail.com>
Signed-off-by: Tarek <tareknaser360@gmail.com>
Signed-off-by: Tarek <tareknaser360@gmail.com>
Signed-off-by: Tarek <tareknaser360@gmail.com>
Signed-off-by: Tarek <tareknaser360@gmail.com>
@tareknaser tareknaser requested a review from kirillt June 24, 2024 22:28
Copy link

Benchmark for d54ec31

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 250.6±1.04µs 251.6±1.73µs +0.40%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.06µs 15.6±0.14µs +0.65%
blake3_resource_id_creation/compute_from_bytes:small 1372.1±3.90ns 1369.8±6.82ns -0.17%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 198.5±0.66µs 198.5±0.59µs 0.00%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1724.4±4.71µs 1734.8±23.36µs +0.60%
crc32_resource_id_creation/compute_from_bytes:large 86.8±0.56µs 86.7±0.51µs -0.12%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.04µs 5.4±0.02µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.4±0.42ns 92.4±0.33ns 0.00%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 65.8±0.31µs 65.5±0.46µs -0.46%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 978.2±3.90µs 975.1±21.61µs -0.32%
index_build/index_build/../test-assets/ 1045.3±6.50µs 1045.6±7.40µs +0.03%

README.md Outdated Show resolved Hide resolved
@kirillt kirillt self-requested a review June 25, 2024 07:36
Copy link
Member

@kirillt kirillt left a comment

Choose a reason for hiding this comment

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

Looks good. Do you think we could rename this repo to ark-core?

Signed-off-by: Tarek <tareknaser360@gmail.com>
Copy link

Benchmark for c0121c9

Click to view benchmark
Test Base PR %
blake3_resource_id_creation/compute_from_bytes:large 250.3±1.49µs 248.9±1.27µs -0.56%
blake3_resource_id_creation/compute_from_bytes:medium 15.5±0.06µs 15.6±0.03µs +0.65%
blake3_resource_id_creation/compute_from_bytes:small 1366.9±8.22ns 1366.8±6.46ns -0.01%
blake3_resource_id_creation/compute_from_path:../test-assets/lena.jpg 198.4±0.56µs 198.9±1.14µs +0.25%
blake3_resource_id_creation/compute_from_path:../test-assets/test.pdf 1763.7±4.25µs 1778.1±43.91µs +0.82%
crc32_resource_id_creation/compute_from_bytes:large 86.7±0.45µs 86.7±0.43µs 0.00%
crc32_resource_id_creation/compute_from_bytes:medium 5.4±0.03µs 5.4±0.02µs 0.00%
crc32_resource_id_creation/compute_from_bytes:small 92.4±0.47ns 93.2±6.13ns +0.87%
crc32_resource_id_creation/compute_from_path:../test-assets/lena.jpg 65.4±0.38µs 65.9±2.56µs +0.76%
crc32_resource_id_creation/compute_from_path:../test-assets/test.pdf 977.3±8.52µs 975.7±4.68µs -0.16%
index_build/index_build/../test-assets/ 1102.4±7.32µs 1084.0±5.73µs -1.67%

@tareknaser tareknaser merged commit 387585b into main Jun 27, 2024
4 checks passed
@tareknaser tareknaser deleted the java_gradle branch June 27, 2024 10:52
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