shaonianche opened a new pull request, #8649:
URL: https://github.com/apache/opendal/pull/8649
# Which issue does this PR close?
Closes #7826.
# Rationale for this change
Each service crate declares its supported operations, conditional options,
and size limits in `Capability`, while `Operator::new` also enables simulated
capabilities through `SimulateLayer` (under the default `auto-simulate`
feature) and `GlobLayer`. Currently, `/services` only documents configuration
options and `docs.rs` lists only a handful of top-level operation checkboxes,
making it difficult to compare capabilities across backends or check how widely
a specific capability is supported.
# What changes are included in this PR?
- Extend `odev generate -l docs` (`just generate docs`) with
`dev/src/generate/capabilities_docs.rs` to parse
`core/core/src/types/capability.rs` and extract each service's `Capability {
... }` struct literal (evaluating service-local `usize` constants, conditional
expressions, `#[cfg(...)]` attributes, and default `SimulateLayer` /
`GlobLayer` capability rules) into `website/data/capabilities.json`. Because
`ci_odev.yml` already runs `generate -l docs` and checks `git diff
--exit-code`, capability documentation stays in sync with core changes.
- Add `/services/capabilities/` in `website/plugins/services-docs-plugin.js`
(`CapabilitiesPage.jsx`) with operation group tabs, service search, per-column
support counts, clickable capability filters, a toggle for default layers
(`SimulateLayer` and `GlobLayer`), inline condition/field reference tables, and
notes on runtime fallbacks (`list` recursion, directory `stat`,
`Writer::copy_from`, and `CapabilityOverrideLayer`).
- Add a capability matrix entry banner on `/services/` and a grouped
`Capabilities` section (`#capabilities`) on each `/services/<scheme>/` page,
and link `/services/capabilities` from the Concepts and Rust core guides.
## Screenshots
- Capability matrix (`/services/capabilities/` — Summary):

- Filtering by capability and operation group
(`/services/capabilities/?group=write`):

- Per-service capability section (`/services/s3/#capabilities`):

# Are there any user-facing changes?
Adds `/services/capabilities/` and per-service capability tables on the
documentation website. No library API or behavior changes.
# Breaking changes
# AI Usage Statement
- **Harness:** Amp
- **Model:** `gemini-4-carbon`, `google-vertex/gemini-4-neon`
- **Effort:** default (`gemini-4-carbon`), `high` (`gemini-4-neon`)
- **Role:** Audited service `Capability` initializers and default layer
rules, implemented the `odev` AST extractor and unit tests, built the website
capability pages, and verified runtime parity against
`OperatorInfo::capability()` and Docusaurus builds. `Option<usize>` limits
guarded by `target_pointer_width = "64"` are rendered using their 64-bit values
(noting `64-bit targets` when 32-bit builds omit the limit).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]