KinomotoMio opened a new pull request, #6503:
URL: https://github.com/apache/opendal/pull/6503

   # Which issue does this PR close?
   
   Closes #6250.
   
   # Rationale for this change
   
   Currently, the C++ binding hardcodes all storage service features in 
`Cargo.toml`, which means:
     - Users must compile and link all services regardless of their actual needs
     - Binary size is unnecessarily large
     - Compilation time is longer than necessary
   
   This PR implements user-configurable features similar to the C binding 
(#4313), allowing users to specify only the storage services they need at build 
time.
   
   # What changes are included in this PR?
   
   - **Modified `bindings/cpp/Cargo.toml`**: Removed hardcoded service 
dependencies, keeping only the essential `blocking` feature
   - **Enhanced `bindings/cpp/CMakeLists.txt`**:
       - Added `FEATURES` cache variable for user configuration
       - Implemented intelligent feature merging logic that combines 
user-specified services with async support
       - Maintains backward compatibility with existing `OPENDAL_ENABLE_ASYNC` 
option
   - **Removed obsolete feature handling**: Cleaned up the previous hardcoded 
async feature logic
   
   # Are there any user-facing changes?
   
   - New option: FEATURES - allows users to specify which OpenDAL storage 
services to include
   - Behavior change: By default, no storage services are included (users must 
explicitly specify needed services)
   - Backward compatibility: Existing usage of OPENDAL_ENABLE_ASYNC continues 
to work unchanged
   - Migration: Users upgrading will need to add -DFEATURES="service1,service2" 
to their cmake commands to include storage services
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@opendal.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to