Repository navigation
docs #396: expand Client API docs, fix intra-doc links, improve quick-start guides - #397
Conversation
…re link to README
…mpty security placeholder
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughThis PR refreshes d-engine's user-facing documentation and configuration guidance. It clarifies the two client modes (embedded and standalone gRPC), adds configuration reference materials, revamps the overview with entry-point guidance and Client API tables, enhances quick-start guides with examples (including a Rust client), and disables doctests in the crate lib config. ChangesDocumentation and Configuration Guidance Overhaul
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
d-engine-server/src/api/embedded_client.rs (1)
117-119: ⚡ Quick winComplete the intra-doc link syntax.
The doc references use plain backticks. For consistency with the PR's goal to fix intra-doc link warnings and to enable clickable navigation, these should use proper rustdoc link syntax.
📖 Proposed fix
-/// Zero-overhead KV client for embedded mode. Obtained via `EmbeddedEngine::client()`. +/// Zero-overhead KV client for embedded mode. Obtained via [`EmbeddedEngine::client()`]. /// -/// For standalone/gRPC mode use `GrpcClient` instead. Both implement `ClientApi`. +/// For standalone/gRPC mode use [`GrpcClient`] instead. Both implement [`ClientApi`].Note: Verify the correct cross-crate paths for
EmbeddedEngine(likelyd_engine::EmbeddedEngine) andGrpcClient(likely ind_engine_client).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@d-engine-server/src/api/embedded_client.rs` around lines 117 - 119, Update the doc comment to use Rust intra-doc link syntax instead of plain backticks: replace `EmbeddedEngine`, `GrpcClient`, and `ClientApi` with proper links like [`EmbeddedEngine`] and [`GrpcClient`] (or fully-qualified paths such as [`d_engine::EmbeddedEngine`] and [`d_engine_client::GrpcClient`] if needed) so the references become clickable and resolve across crates; ensure the link targets match the actual crate paths and keep the explanatory text unchanged.d-engine-client/src/grpc_client.rs (1)
33-35: ⚡ Quick winComplete the intra-doc link syntax.
The doc references to
ClientBuilder,EmbeddedClient, andClientApiuse plain backticks. Since the PR objectives mention "fixes intra-documentation link warnings," these should use proper rustdoc link syntax for clickability and to eliminate warnings.📖 Proposed fix
-/// gRPC-based KV client for standalone mode. Obtained via [`crate::ClientBuilder`]. +/// gRPC-based KV client for standalone mode. Obtained via [`crate::ClientBuilder`](crate::ClientBuilder). /// -/// For embedded mode use `EmbeddedClient` instead. Both implement `ClientApi`. +/// For embedded mode use `EmbeddedClient` instead. Both implement [`ClientApi`](d_engine_core::client::ClientApi).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@d-engine-client/src/grpc_client.rs` around lines 33 - 35, The module docstring uses plain backticks for intra-doc references and must be converted to rustdoc link syntax: replace `ClientBuilder`, `EmbeddedClient`, and `ClientApi` in the comment with their intra-doc links (e.g., [`ClientBuilder`], [`EmbeddedClient`], and [`ClientApi`]) so rustdoc generates clickable links and removes the intra-doc warnings; ensure the bracketed links match the exact item names/signatures used in the crate.d-engine-core/src/client/client_api.rs (1)
33-38: ⚡ Quick winComplete the intra-doc link syntax.
The doc references to
EmbeddedClient,GrpcClient,engine.client(), andClientBuilderuse plain backticks. For consistency with the PR's goal to fix intra-doc link warnings and to enable clickable navigation in rendered docs, these should use proper rustdoc link syntax.📖 Proposed fix
-/// Unified key-value store interface implemented by `EmbeddedClient` and `GrpcClient`. +/// Unified key-value store interface implemented by [`EmbeddedClient`] and [`GrpcClient`]. /// -/// You do **not** need to import or name this trait directly — use the concrete client type -/// returned by `engine.client()` or `ClientBuilder` and call methods on it. +/// You do **not** need to import or name this trait directly — use the concrete client type +/// returned by [`EmbeddedEngine::client()`] or [`ClientBuilder`] and call methods on it. /// /// Only import `ClientApi` when writing generic code over both client types.Note: You'll need to verify the correct paths for the cross-crate links (
EmbeddedClientis ind-engine-server,GrpcClientis ind-engine-client,EmbeddedEngineandClientBuilderare likely ind-engine).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@d-engine-core/src/client/client_api.rs` around lines 33 - 38, Update the doc comment on the ClientApi trait to use rustdoc intra-doc links instead of plain backticks: replace `EmbeddedClient`, `GrpcClient`, `engine.client()`, and `ClientBuilder` with their intra-doc link forms (e.g. [EmbeddedClient], [GrpcClient], [`engine::client()`] or the correct method path, and [ClientBuilder]) so the docs become clickable; ensure you use the correct crate paths for cross-crate links (EmbeddedClient in d-engine-server, GrpcClient in d-engine-client, and the appropriate paths for engine.client() and ClientBuilder) and keep the surrounding explanatory text unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@d-engine/src/docs/overview.md`:
- Around line 64-74: The doc entry for EmbeddedClient::get_lease is incorrect:
it currently says "TTL remaining for a key" but get_lease is a lease-based
linearizable read consistency method; update the description in the Read table
to reflect that it is a lease-based/lease-backed linearizable read policy (or
"Lease-based linearizable read" / "Read using lease-based linearizable
consistency") so it matches the ClientApi trait and contextual snippets
referencing get_lease.
---
Nitpick comments:
In `@d-engine-client/src/grpc_client.rs`:
- Around line 33-35: The module docstring uses plain backticks for intra-doc
references and must be converted to rustdoc link syntax: replace
`ClientBuilder`, `EmbeddedClient`, and `ClientApi` in the comment with their
intra-doc links (e.g., [`ClientBuilder`], [`EmbeddedClient`], and [`ClientApi`])
so rustdoc generates clickable links and removes the intra-doc warnings; ensure
the bracketed links match the exact item names/signatures used in the crate.
In `@d-engine-core/src/client/client_api.rs`:
- Around line 33-38: Update the doc comment on the ClientApi trait to use
rustdoc intra-doc links instead of plain backticks: replace `EmbeddedClient`,
`GrpcClient`, `engine.client()`, and `ClientBuilder` with their intra-doc link
forms (e.g. [EmbeddedClient], [GrpcClient], [`engine::client()`] or the correct
method path, and [ClientBuilder]) so the docs become clickable; ensure you use
the correct crate paths for cross-crate links (EmbeddedClient in
d-engine-server, GrpcClient in d-engine-client, and the appropriate paths for
engine.client() and ClientBuilder) and keep the surrounding explanatory text
unchanged.
In `@d-engine-server/src/api/embedded_client.rs`:
- Around line 117-119: Update the doc comment to use Rust intra-doc link syntax
instead of plain backticks: replace `EmbeddedEngine`, `GrpcClient`, and
`ClientApi` with proper links like [`EmbeddedEngine`] and [`GrpcClient`] (or
fully-qualified paths such as [`d_engine::EmbeddedEngine`] and
[`d_engine_client::GrpcClient`] if needed) so the references become clickable
and resolve across crates; ensure the link targets match the actual crate paths
and keep the explanatory text unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d2e88310-d37d-4846-94ec-f85b12d9494e
📒 Files selected for processing (10)
README.mdconfig/base/README.mdconfig/base/storage.tomld-engine-client/src/grpc_client.rsd-engine-core/src/client/client_api.rsd-engine-core/src/config/security.rsd-engine-server/src/api/embedded_client.rsd-engine/src/docs/overview.mdd-engine/src/docs/quick-start-5min.mdd-engine/src/docs/quick-start-standalone.md
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…nore in doc examples
What Does This PR Do?
Adds a complete "Client API at a Glance" table to the docs landing page, fixes all
intra-doc link warnings, and improves both quick-start guides with clearer entry points
and working examples.
Type:
Why Is This Needed?
Developers couldn't discover d-engine's client API without reading source code — the
docs landing page lacked a complete method table and clear entry points for both
EmbeddedClientandGrpcClient. The standalone quick-start had no Rust example.The
config/base/directory had no explanation, causing confusion about whetherthe base/overlays pattern was intended for production use (it is not).
Checklist
Required:
make testpassesIf changing APIs:
Testing
How tested:
cargo doc --features "client,server,rocksdb,watch"— zero warningstarget/doc/d_engine/index.htmlDoes This Follow d-engine's Principles?
Reviewer Notes
Documentation-only PR — no logic changes. Key changes:
overview.md: all client methods now visible on landing page;EmbeddedClientandGrpcClientlinked to their respective doc pages; Quick Start usesstart()(no config file required)quick-start-standalone.md: added RustClientBuilderexamplequick-start-5min.md: removed out-of-place performance table; config step now linksto
d_engine_core::configfor all optionsconfig/base/README.md: new file clarifying this directory is for internal demo onlyd-engine-core/src/config/security.rs: deleted empty placeholder fileEstimated review complexity:
Summary by CodeRabbit
Documentation
Chores