Skip to content

Commit

Permalink
feat(bindings/java): bundled services (#2934)
Browse files Browse the repository at this point in the history
* feat(bindings/java): bundled services

Signed-off-by: tison <wander4096@gmail.com>

* fix: enable all for tokio runtime

Signed-off-by: tison <wander4096@gmail.com>

* ci: set up protoc

Signed-off-by: tison <wander4096@gmail.com>

---------

Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun committed Aug 25, 2023
1 parent 722993f commit 69a4f72
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/bindings_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
run: ./mvnw verify artifact:compare
47 changes: 45 additions & 2 deletions bindings/java/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
1 change: 1 addition & 0 deletions bindings/java/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
)
Expand Down

0 comments on commit 69a4f72

Please sign in to comment.