GitHub user Xuanwo edited a discussion: ideas: Split opendal rust core into multiple crates
> This idea is part of [The Way to OpenDAL Rust Core > v1.0](https://github.com/apache/opendal/discussions/5189) ## Background OpenDAL Rust expose tow levels of APIs: - Public API: all APIs that exposed under `opendal::*` like `Operator`, `Reader`, `Writer`. - Raw API: all APIs that exposed under `opendal::raw::*` like `Access`, `oio::Read`, `oio::Write` OpenDAL's public APIs rarely change, yet the raw APIs are frequently refactored. Even when there are no changes within the public API, users still need to upgrade simultaneously. At the same time, the OpenDAL Rust core is quite extensive and includes: - all services: `services::s3`, `services::gcs`, etc. - all layers: `layers::RetryLayer`, `layers::MetricsLayer`, etc. We used to increment OpenDAL versions solely due to an API change in `services::s3`. I'm considering whether it would be beneficial to split the OpenDAL Rust core into multiple crates, allowing users to independently upgrade services like S3 as needed. More importantly, this approach would provide users with a stable API for `Operator`, ensuring compatibility across all versions. ## Idea ### Plan A: Split all and keep the shell Divide the opendal rust core into: - `opendal` - `opendal_core` - `opendal_service_xxx` (like opendal_service_s3) - `opendal_layer_xxx` (like opendal_layer_retry) The crate `opendal` serves as a shell that includes all widely used services and layers. Throughout its evolution, we may remove some services. ### Plan B: Split Core Only Only divide opendal core out: - `opendal` - `opendal_core` `opendal` will depend on and re-expore all API from `opendal_core` instead. This will make it super easier for users to implement their own services. ### Plan C: Split all Remove all services and layers from `opendal`: - `opendal` - `opendal_service_xxx` (like opendal_service_s3) - `opendal_layer_xxx` (like opendal_layer_retry) `opendal` itself will not provide any services. Following this change, users will need to add new crates instead of incorporating new features. --- What are your thoughts? I welcome any comments or feedback. GitHub link: https://github.com/apache/opendal/discussions/5206 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
