new feature: Support creating and registering custom services via FFI
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 32/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- backend-api-design
Research direction
Start with the existing C bindings, including opendal_bytes, opendal_error, opendal_metadata, and the opendal_operator_* entry points, then compare them with the Access pattern in core/services/huggingface and the generic OperatorRegistry registration API. Done should mean a separately compiled service can register across the FFI boundary and be wrapped as a normal Operator with layers.
Written by the indexing model from the issue text.
Description
Feature Description
Enable third-party applications to register custom OpenDAL services (implementations of Access) across FFI boundaries, so that external Rust crates compiled as separate shared libraries can provide new storage backends without compile-time coupling.
Desired outcome
An extension author can:
- Implement an OpenDAL service in Rust (following the standard Access pattern, like https://github.com/apache/opendal/tree/main/core/services/huggingface)
- Compile it as a standalone shared library (no compile-time dependency on the host application)
- Register it with the host application at runtime via some ABI-stable mechanism
- The host application wraps it as a normal Operator with its own layers (retry, metrics, etc.)
The existing C-ABI types (opendal_bytes, opendal_error, opendal_metadata, etc.) seem like natural building blocks for this.
Problem and Solution
We're integrating OpenDAL into https://github.com/Eventual-Inc/Daft (a distributed dataframe engine) to support pluggable storage backends. Our users want to implement custom protocols (e.g. my-proprietary-protocol://) by writing an OpenDAL service in Rust, packaging it as a Python wheel (cdylib via PyO3/maturin), and registering it at runtime.
The challenge is that Daft and the extension are separate shared libraries loaded into the same Python process. They each statically link their own copy of OpenDAL, so Rust types can't be safely shared across the dylib boundary.
Current state:
OpenDAL's C bindings let you consume services (call opendal_operator_read, etc.), but there's no way to implement a service from the other side of an FFI boundary. The OperatorRegistry requires compile-time generics (register<B: Builder>), so you can't register a service from a separately compiled shared library.
Additional Context
Use cases
- Daft — pluggable storage protocols for a dataframe engine (the motivating use case)
- Any application embedding OpenDAL that wants to allow third-party storage plugins without recompilation
- Cross-language service implementations — implement an OpenDAL service in Go, Python (via cffi), etc.
Are you willing to contribute to the development of this feature?
- Yes, I am willing to contribute to the development of this feature.
- Dominant language
- Rust
- Stars
- 5.5k
- Forks
- 869
- Avg merge
- 8h 2m
- Merged PRs (30d)
- 862
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/opendal
-
bug(services/fs): deleting "/" removes the configured root directoryPossibly taken @xgbtxy claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
apache/opendal#9635 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
core enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
apache/opendal#9572 · 1 reaction ·
Maintainers usually reply within 1 day
-
fix(bindings/nodejs): reject negative and overflowing BigInt values in WriteOptions.chunk and Read/ReaderOptions.gapPossibly taken @rohan4naik claimed this today. Openbindings/nodejs bug
Difficulty 3/5 1-2 days Newbie friendliness 76/100
apache/opendal#9569 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
bug(layers/throttle): throttle streaming ReadStream bytes instead of pre-charging ReadOptions::limit upper bounds on open()Possibly taken @Xuanwo claimed this today. Openbug core
Difficulty 5/5 Over a week Newbie friendliness 25/100
apache/opendal#9567 · 1 reaction ·
Maintainers usually reply within 1 day
-
bindings/c bindings/dotnet bindings/go bindings/java bindings/python bindings/ruby core integrations/object_store release release-blocker services/azblob services/azdls services/dropbox services/gcs_grpc services/git services/hf3fs services/redis services/remotestorage services/s3 website
Difficulty 5/5 Over a week Newbie friendliness 20/100
apache/opendal#9560 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
Android bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anefzaoui/misterdownloadmanager#2516 ·
Maintainers usually reply within 1 day
-
editor ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
state:triage tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 89/100
agent8-cash/ethpayserver#731 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day