Skip to content

Conversation

amotl
Copy link
Member

@amotl amotl commented Oct 16, 2025

@amotl amotl added the cross linking Linking to different locations of the documentation. label Oct 16, 2025
Copy link

coderabbitai bot commented Oct 16, 2025

Walkthrough

Adds a Rust driver card to the Drivers-by-language grid, adds Rust to the drivers toctree, creates a new docs/connect/rust.md page with connection examples using the postgres crate, and ignores https://crates.io/crates/ in the Sphinx linkchecker.

Changes

Cohort / File(s) Summary
Drivers index update
docs/connect/index.md
Added a Rust driver card to the Drivers-by-language grid (label, link, alt text, styling classes, {fab} icon) and added Rust to the All drivers toctree list.
New Rust driver doc
docs/connect/rust.md
Added a new documentation page demonstrating connecting to CrateDB from Rust via the postgres crate: localhost (NoTls) and CrateDB Cloud (TLS) synopses, Client::connect examples, installation notes, example repo card, CI badge, and crates.io reference.
Sphinx config update
docs/conf.py
Added r"https://crates.io/crates/" to linkcheck_ignore with a comment noting "404 Client Error: Not Found".

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Developer
    participant RustApp as Rust App
    participant PostgresCrate as postgres crate
    participant CrateDB as CrateDB

    Developer->>RustApp: run example
    RustApp->>PostgresCrate: Client::connect(conn_str, NoTls / TLS)
    PostgresCrate->>CrateDB: open connection (Postgres protocol, TLS optional)
    CrateDB-->>PostgresCrate: connection OK / error
    PostgresCrate-->>RustApp: Client handle / error

    RustApp->>PostgresCrate: client.query("SELECT ...")
    PostgresCrate->>CrateDB: execute query
    CrateDB-->>PostgresCrate: rows / error
    PostgresCrate-->>RustApp: rows iterator / error
    RustApp->>Developer: print results / report error
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

new content

Suggested reviewers

  • kneth
  • surister

Poem

I hop through docs with whiskered care,
I plant a Rust card here and there.
A tiny crate, a query bright,
Rows like carrots in morning light.
Hooray for Rust — I share and spare! 🐇🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Driver: Add page about Rust" directly and accurately reflects the main change in the pull request. The PR adds a new documentation page (docs/connect/rust.md) for connecting to CrateDB from Rust, and updates the driver index page to include the Rust driver. The title is concise, clear, and free from vague terms or noise, making it immediately understandable to someone reviewing the commit history.
Description Check ✅ Passed The pull request description, while minimal, is related to the changeset. The description acknowledges the change and provides a preview link that points to the newly added Rust driver documentation page that was built and deployed. Although the written description is brief and the phrase "What the title says" is somewhat vague, the preview link demonstrates direct relevance to the actual changes in the PR, satisfying the lenient requirement that the description simply be related to the changeset rather than comprehensive.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rust

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af0f022 and 5ef1dec.

📒 Files selected for processing (3)
  • docs/conf.py (1 hunks)
  • docs/connect/index.md (2 hunks)
  • docs/connect/rust.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-15T22:25:48.433Z
Learnt from: amotl
PR: crate/cratedb-guide#226
File: docs/integrate/queryzen/index.md:51-51
Timestamp: 2025-08-15T22:25:48.433Z
Learning: CrateDB provides a built-in `sys.summits` table that is suitable for demonstration purposes of any kind. This is a system table that can be used in examples and tutorials.

Applied to files:

  • docs/connect/rust.md
🪛 LanguageTool
docs/connect/index.md

[grammar] ~115-~115: There might be a mistake here.
Context: ...40px ``` :::: ::::{grid-item-card} Rust 🔗 connect-rust :link-type: ref :lin...

(QB_NEW_EN)


[grammar] ~116-~116: There might be a mistake here.
Context: ...grid-item-card} Rust 🔗 connect-rust :link-type: ref :link-alt: Connect to Cr...

(QB_NEW_EN)


[grammar] ~117-~117: There might be a mistake here.
Context: ...Rust 🔗 connect-rust :link-type: ref :link-alt: Connect to CrateDB using Rust...

(QB_NEW_EN)


[grammar] ~118-~118: There might be a mistake here.
Context: ...:link-alt: Connect to CrateDB using Rust :padding: 3 :text-align: center :class-c...

(QB_NEW_EN)


[grammar] ~119-~119: There might be a mistake here.
Context: ...onnect to CrateDB using Rust :padding: 3 :text-align: center :class-card: sd-pt-3...

(QB_NEW_EN)


[grammar] ~120-~120: There might be a mistake here.
Context: ...ing Rust :padding: 3 :text-align: center :class-card: sd-pt-3 :class-body: sd-fs-...

(QB_NEW_EN)


[grammar] ~121-~121: There might be a mistake here.
Context: ...:text-align: center :class-card: sd-pt-3 :class-body: sd-fs-1 :class-title: sd-fs...

(QB_NEW_EN)


[grammar] ~122-~122: There might be a mistake here.
Context: ...class-card: sd-pt-3 :class-body: sd-fs-1 :class-title: sd-fs-6 {fab}rust :::: ...

(QB_NEW_EN)


[grammar] ~123-~123: There might be a mistake here.
Context: ...lass-body: sd-fs-1 :class-title: sd-fs-6 {fab}rust :::: ::::: :::{rubric} Pr...

(QB_NEW_EN)


[grammar] ~124-~124: There might be a mistake here.
Context: ...d-fs-1 :class-title: sd-fs-6 {fab}rust :::: ::::: :::{rubric} Protocol Suppo...

(QB_NEW_EN)

docs/connect/rust.md

[grammar] ~9-~9: There might be a mistake here.
Context: ...ust applications. ::: :::{rubric} About ::: [postgres] is a synchronous Rust cl...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.18.1)
docs/connect/rust.md

67-67: Bare URL used

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build docs
🔇 Additional comments (10)
docs/conf.py (1)

87-88: LGTM! Appropriate linkcheck exclusion.

The ignore pattern correctly handles crates.io URLs referenced in the new Rust documentation, preventing spurious 404 errors during link checking.

docs/connect/index.md (3)

115-125: LGTM! Rust card follows established pattern.

The Rust card structure is consistent with other language cards in the grid, using the same directive format, styling, and layout.


201-201: LGTM! Proper toctree placement.

Rust is correctly added to the drivers toctree in alphabetical order between Ruby and the Natural language section.


115-124: Static analysis warnings are false positives.

The LanguageTool grammar warnings on these lines are incorrectly flagging MyST Markdown directive syntax (:link:, :class-card:, etc.) as grammar errors. These are valid directives, not prose, and should be ignored.

docs/connect/rust.md (6)

1-12: LGTM! Clear introduction and context.

The header and About section effectively introduce the Rust postgres crate as the recommended client for CrateDB connectivity.


14-35: LGTM! Correct localhost example.

The localhost example demonstrates:

  • Proper dependency installation via cargo
  • Correct use of NoTls for local connections with sslmode=disable
  • Valid query against the built-in sys.summits table
  • Appropriate error handling with the ? operator

Based on learnings: The sys.summits table is a built-in system table in CrateDB suitable for demonstration purposes.


37-61: LGTM! Cloud example with proper TLS setup.

The CrateDB Cloud example correctly demonstrates:

  • Additional TLS dependencies installation
  • TLS connector initialization inside main() (previous issue resolved)
  • Proper placeholder URL format for Cloud clusters (previous issue resolved)
  • Consistent query structure with the localhost example

64-76: LGTM! Helpful example reference and CI status.

The example card links to the working sample code in cratedb-examples, and the CI badge provides visibility into the example's test status.


78-78: LGTM! Proper crate reference.

The link definition correctly points to the postgres crate on crates.io, which is now covered by the linkcheck ignore pattern in docs/conf.py.


9-9: Static analysis warnings are false positives.

  • Line 9: LanguageTool incorrectly flags the MyST :::{rubric} directive syntax as a grammar error.
  • Line 67: markdownlint flags "bare URL" but the :link: directive is the proper MyST syntax for card links.

Both warnings should be dismissed.

Also applies to: 67-67


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@amotl amotl requested review from kneth and surister October 16, 2025 11:15
coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cross linking Linking to different locations of the documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant