-
Notifications
You must be signed in to change notification settings - Fork 45
feat: initial FFI crate + Java bindings #2516
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2fc396a
feat: initial FFI crate + Java bindings
a10y 1958307
daemon-jvm
a10y 2406a20
actually fix daemonJvm toolchain management
a10y 600a4ec
small lints
a10y a1456bf
add *.so to gitignore
a10y 990a3d2
run miri on ffi tests
a10y cdf14d7
remove unused section
a10y 0c98082
timing, fix test runner config
a10y 4367079
feat: Spark v0 (#2584)
a10y 8d3a87a
import, remove generated_src
a10y 1e909b9
add README for vortex-ffi
a10y 18d6c8a
publish java
a10y 0c3d932
target version java 11
a10y 597cab1
comments
a10y db22b96
cargo.toml fmt
a10y 1f173b9
NativeFile return List
a10y File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# Linux start script should use lf | ||
/gradlew text eol=lf | ||
|
||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf | ||
|
||
# Binary files should be left untouched | ||
*.jar binary | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Ignore Gradle build output directory | ||
build | ||
|
||
# generated source directories | ||
generated_src/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Java Bindings Development | ||
|
||
Install a JDK 17 toolchain. | ||
a10y marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
You can run tests like | ||
|
||
``` | ||
./gradlew test | ||
``` | ||
|
||
You can build a JAR file with | ||
|
||
``` | ||
./gradlew jar | ||
``` | ||
|
||
The JAR files will contain platform native code from `vortex-ffi` to operate on Vortex data. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import net.ltgt.gradle.errorprone.errorprone | ||
|
||
plugins { | ||
id("com.diffplug.spotless") version "7.0.1" | ||
id("com.palantir.consistent-versions") version "2.31.0" | ||
id("com.palantir.git-version") version "3.1.0" | ||
id("io.github.gradle-nexus.publish-plugin") version "1.3.0" | ||
id("net.ltgt.errorprone") version "4.1.0" apply false | ||
id("org.inferred.processors") version "3.7.0" apply false | ||
} | ||
|
||
val gitVersion: groovy.lang.Closure<String> by extra | ||
version = gitVersion() | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
username.set(System.getenv("MAVEN_CENTRAL_USER")) | ||
password.set(System.getenv("MAVEN_CENTRAL_PASSWORD")) | ||
} | ||
} | ||
} | ||
|
||
allprojects { | ||
apply(plugin = "com.diffplug.spotless") | ||
|
||
group = "dev.vortex" | ||
version = rootProject.version | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
tasks.withType<Test> { | ||
useJUnitPlatform() | ||
|
||
maxHeapSize = "1G" | ||
|
||
testLogging { | ||
events("passed") | ||
} | ||
} | ||
|
||
plugins.withType<JavaLibraryPlugin> { | ||
apply(plugin = "net.ltgt.errorprone") | ||
apply(plugin = "org.inferred.processors") | ||
|
||
dependencies { | ||
"errorprone"("com.google.errorprone:error_prone_core") | ||
"errorprone"("com.jakewharton.nopen:nopen-checker") | ||
"compileOnly"("com.jakewharton.nopen:nopen-annotations") | ||
} | ||
|
||
spotless { | ||
java { | ||
palantirJavaFormat() | ||
licenseHeaderFile("${rootProject.projectDir}/.spotless/java-license-header.txt") | ||
} | ||
} | ||
|
||
tasks.withType<JavaCompile> { | ||
options.errorprone.disable("UnusedVariable") | ||
options.release = 11 | ||
|
||
// Needed to make sure that the barista-annotations emits to the correct directory | ||
options.generatedSourceOutputDirectory = projectDir.resolve("generated_src") | ||
} | ||
|
||
tasks.withType<Javadoc> { | ||
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:-missing") | ||
} | ||
|
||
the<JavaPluginExtension>().toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(17)) | ||
vendor.set(JvmVendorSpec.AMAZON) | ||
} | ||
|
||
tasks["check"].dependsOn("spotlessCheck") | ||
} | ||
|
||
spotless { | ||
kotlinGradle { | ||
ktlint() | ||
} | ||
} | ||
|
||
tasks.register("format").get().dependsOn("spotlessApply") | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#org.gradle.configuration-cache=true | ||
org.gradle.parallel=true | ||
org.gradle.caching=true | ||
|
||
# extra JVM args needed to allow Spotless to access JDK private classes. | ||
org.gradle.jvmargs =--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ | ||
a10y marked this conversation as resolved.
Show resolved
Hide resolved
|
||
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ | ||
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ | ||
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ | ||
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#This file is generated by updateDaemonJvm | ||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/ff8d269e2495c538cfa04b4b52d22286/redirect | ||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/4dfe7aab2abf71db71537e9dca36c154/redirect | ||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/ff8d269e2495c538cfa04b4b52d22286/redirect | ||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/4dfe7aab2abf71db71537e9dca36c154/redirect | ||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/9a7f49eb8ed1ea9722ebec95f4befa0e/redirect | ||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/2a0209399b0a7928a6e5fc680e1c0d35/redirect | ||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/ff8d269e2495c538cfa04b4b52d22286/redirect | ||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/4dfe7aab2abf71db71537e9dca36c154/redirect | ||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7a3c43a8ed30b293ba959c80ccf2a757/redirect | ||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/a5678544b69a5c533a76c11213c7b7ed/redirect | ||
toolchainVersion=17 |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.