Tracking issue of missing functionalities in OpenDAL C binding
Currently the C binding supports...
- [x] write
- [x] read
- [x] delete
- [x] stat
- [x] is_exist
- [x] list
The missing functionalities are.... (welcome to add up)
- [ ] async support
- [x] check()
- [x] copy()
- [x] rename()
- [ ] remove() (remove_all(), remove_via())
- [x] reader()
- [x] writer()
- [ ] Future APIs (append (through
write_with(...).append(...)), etc.)- This may need some discussions on the implementations since the C does not have such concepts as Future.
- [ ] presign APIs (I think this could be considered later)
I'm thinking about adding reader and writer so users can control the underlying data operations. I'm not sure if it's much better to have an opendal-cpp instead.
I'm thinking about adding
readerandwriterso users can control the underlying data operations. I'm not sure if it's much better to have an opendal-cpp instead.
We could have an opendal cpp binding, but cbindgen generates reletively the same library and header files. Hence the implementation is roughly the same.
I mean its possible that the opendal cpp binding need to share the underlying impl of the C binding but it could wrap it in a better way obviously.
We could have an opendal cpp binding, but cbindgen generates reletively the same library and header files. Hence the implementation is roughly the same.
I'm thinking about cxx instead. The biggest benefit is that we can use existing types in std, for example std::string and std::vector.
- Future APIs (append(), etc.)
Please note that append has been removed: it's now op.write_with("path", bs).append(true).await
We could have an opendal cpp binding, but cbindgen generates reletively the same library and header files. Hence the implementation is roughly the same.
I'm thinking about cxx instead. The biggest benefit is that we can use existing types in
std, for examplestd::stringandstd::vector.
Definitely, it would be way better to develop on std containers!
Can c binding add async support? Only having blocking API, concurrency performance will be a problem.
Can c binding add async support? Only having blocking API, concurrency performance will be a problem.
I would say it is 100% possible to implement this since hyper already does this. But it might take me a while to design and implement this since it is relatively complex in C.
If supporting async in C bindings is difficult, it would be better to directly provide an async API for C++ bindings. 😄
-
[ ] async support
-
[x] check() https://github.com/apache/opendal/pull/5851
-
[x] copy() https://github.com/apache/opendal/pull/3517
-
[x] rename() https://github.com/apache/opendal/pull/3517
-
[ ] remove() (remove_all(), remove_via()) https://github.com/apache/opendal/pull/5851#issuecomment-2745379005
-
[x] reader() https://github.com/apache/opendal/pull/3259
-
[x] writer() https://github.com/apache/opendal/pull/5141