You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/08/25 09:06:54 UTC
[incubator-opendal] branch main updated: feat(bindings/java): bundled services (#2934)
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 69a4f721e feat(bindings/java): bundled services (#2934)
69a4f721e is described below
commit 69a4f721e58210425a98779802486e7133c3fba5
Author: tison <wa...@gmail.com>
AuthorDate: Fri Aug 25 17:06:49 2023 +0800
feat(bindings/java): bundled services (#2934)
* feat(bindings/java): bundled services
Signed-off-by: tison <wa...@gmail.com>
* fix: enable all for tokio runtime
Signed-off-by: tison <wa...@gmail.com>
* ci: set up protoc
Signed-off-by: tison <wa...@gmail.com>
---------
Signed-off-by: tison <wa...@gmail.com>
---
.github/workflows/bindings_java.yml | 4 +++-
bindings/java/Cargo.toml | 47 +++++++++++++++++++++++++++++++++++--
bindings/java/src/lib.rs | 1 +
3 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/bindings_java.yml b/.github/workflows/bindings_java.yml
index ec9990436..f2584c837 100644
--- a/.github/workflows/bindings_java.yml
+++ b/.github/workflows/bindings_java.yml
@@ -66,6 +66,8 @@ jobs:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
+ - name: Set up protoc
+ run: sudo apt install -y protobuf-compiler
- name: Build and test
working-directory: bindings/java
# `install` is required to verify reproducible builds:
@@ -75,4 +77,4 @@ jobs:
working-directory: bindings/java
# `artifact:compare` is required to verify reproducible builds:
# https://maven.apache.org/guides/mini/guide-reproducible-builds.html#how-to-test-my-maven-build-reproducibility
- run: ./mvnw verify artifact:compare
\ No newline at end of file
+ run: ./mvnw verify artifact:compare
diff --git a/bindings/java/Cargo.toml b/bindings/java/Cargo.toml
index eb6d9d1ed..94a495675 100644
--- a/bindings/java/Cargo.toml
+++ b/bindings/java/Cargo.toml
@@ -32,10 +32,53 @@ crate-type = ["cdylib"]
doc = false
[dependencies]
-opendal.workspace = true
-
anyhow = "1.0.71"
jni = "0.21.1"
num_cpus = "1.15.0"
once_cell = "1.17.1"
tokio = { version = "1.28.1", features = ["full"] }
+
+[dependencies.opendal]
+workspace = true
+features = [
+ "services-azblob",
+ "services-azdfs",
+ "services-cacache",
+ "services-cos",
+ "services-dashmap",
+ "services-dropbox",
+ "services-etcd",
+ # FIXME this requires a preinstalled fdb library
+ # "services-foundationdb",
+ "services-fs",
+ "services-ftp",
+ "services-gcs",
+ "services-gdrive",
+ "services-ghac",
+ # FIXME how to support HDFS services in bindings?
+ # "services-hdfs",
+ "services-http",
+ "services-ipfs",
+ "services-memcached",
+ "services-memory",
+ "services-mini-moka",
+ "services-moka",
+ "services-obs",
+ "services-onedrive",
+ "services-oss",
+ "services-persy",
+ "services-postgresql",
+ "services-redb",
+ "services-redis",
+ "services-redis-rustls",
+ "services-rocksdb",
+ "services-s3",
+ "services-sftp",
+ "services-sled",
+ "services-supabase",
+ "services-tikv",
+ "services-vercel-artifacts",
+ "services-wasabi",
+ "services-webdav",
+ "services-webhdfs",
+]
diff --git a/bindings/java/src/lib.rs b/bindings/java/src/lib.rs
index b867e8e2a..f838cff56 100644
--- a/bindings/java/src/lib.rs
+++ b/bindings/java/src/lib.rs
@@ -57,6 +57,7 @@ pub unsafe extern "system" fn JNI_OnLoad(vm: JavaVM, _: *mut c_void) -> jint {
*cell.borrow_mut() = Some(env.get_raw());
})
})
+ .enable_all()
.build()
.unwrap(),
)