refactor(services/opfs): split opfs service into separate crate#7021
Merged
Xuanwo merged 5 commits intoapache:mainfrom Dec 17, 2025
Merged
refactor(services/opfs): split opfs service into separate crate#7021Xuanwo merged 5 commits intoapache:mainfrom
Xuanwo merged 5 commits intoapache:mainfrom
Conversation
Move OPFS service from core/src/services/opfs to services/opfs as a standalone crate. This follows the ongoing service extraction pattern to improve modularity and reduce core dependencies. Changes: - Create new services/opfs crate with its own Cargo.toml - Move all OPFS implementation files to services/opfs/src - Remove OPFS-specific dependencies from core/Cargo.toml - Update service feature flag to use opendal-service-opfs dependency - Re-export opfs module in src/lib.rs Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Xuanwo
reviewed
Dec 16, 2025
core/src/lib.rs
Outdated
| pub use opendal_service_mysql::*; | ||
| #[cfg(feature = "services-obs")] | ||
| pub use opendal_service_obs::*; | ||
| #[cfg(feature = "services-opfs")] |
Member
There was a problem hiding this comment.
opfs is only available under wasm32, we need to add flags here.
Contributor
Author
There was a problem hiding this comment.
sure I found it
#[cfg(all(target_arch = "wasm32", feature = "services-opfs"))]
mod opfs;
Contributor
Author
There was a problem hiding this comment.
oh wait CI failed after I update it, let me take a look.
Update opfs service export to use opendal_service_opfs crate with appropriate target architecture constraints for wasm32. Co-Authored-By: Claude <[email protected]>
…ction The OPFS service only works in WebAssembly environments, so the dependency is now correctly placed under the wasm32 target-specific dependencies section instead of the main dependencies. Co-Authored-By: Claude <[email protected]>
Contributor
Author
|
Updated, PTAL @Xuanwo current changes in |
Member
I think that's the cost we need to pay 🤣 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
core/src/services/opfsinto a new cratecore/services/opfs, crate nameopendal-service-opfsopendal::services::Opfs) unchangedservices-opfsChanges
opendal-service-opfscrate atcore/services/opfs/core/Cargo.tomlto use the new crate as optional dependencycore/core/Cargo.tomlcore/src/lib.rsTest plan
cargo checkpassescargo check -p opendal-service-opfs --target wasm32-unknown-unknownpassescargo fmt --checkpassesCloses #6913
🤖 Generated with Claude Code