Skip to content

docs: rust tabs for getting started, keeping the csr fresh, sidebar order - #91

Merged
prrao87 merged 3 commits into
mainfrom
docs/getting-started-rust-tabs
Oct 30, 2026
Merged

prrao87 merged 3 commits into
mainfrom
docs/getting-started-rust-tabs

Conversation

@prrao87

@prrao87 prrao87 commented Oct 30, 2026

Copy link
Copy Markdown
Member

Why

Rust readers could only follow one step of the getting started page, the CSR example, and even that tab used different data and printed a different answer from the Python tab. The CSR page explained what refresh() does to the CSR but not how to keep it current in practice. In the sidebar, the benchmarks sat near the bottom and the two API references were separate top-level entries.

What changed

  • Getting started has Rust tabs throughout. Each Python snippet (the datasets, the graph config, the first query, parameters, the CSR, one-off queries) now has a Rust tab with the same data and query. The tabs are linked, so choosing Rust once switches the whole page. The CSR tab now uses the same in-memory graph as the Python tab, so both tabs print the same answer.
  • The Rust code is compiled and run. As the docs guidelines require, it lives in a getting_started function of the embedded_query example, and the page pulls it in with --8<--. CI already runs that example. Each section ends with the table it prints.
  • A new "How to keep the CSR fresh" section on the CSR page. It covers when to call refresh(), how to check the result with csr_stats(), and what forces a full rebuild instead of a delta (overwriting a relationship dataset, or removing the pinned version before refreshing). It has Python and Rust examples; the Rust tab reuses the example's existing refresh section.
  • Sidebar order. Benchmarks now comes right after Getting started. The Python and Rust (docs.rs) API references are grouped under one "API reference" section.

There are no API or behaviour changes.

Validation

  • cargo run -p lance-csr --example embedded_query: runs, and every new section prints what its output comment says.
  • cargo fmt --all -- --check and cargo clippy -p lance-csr --example embedded_query -- -D warnings: clean.
  • docs/check_snippets.py against a fresh make install of this branch: all blocks pass, and the new CSR snippet prints 5 1 delta as its comment says.
  • uv run --project docs --locked zensical build --strict: no issues. uvx typos@1.26.0 .: clean.
  • In a browser, against the built site: the sidebar order is right, the new CSR section renders, and selecting Rust on one getting started tab switches all six code tabs.
  • No benchmarks: no engine code changed. CI is pending.

🤖 Generated with Claude Code

Each Python snippet on the getting started page now has a Rust tab with
the same data and query. The Rust code lives in a getting_started
function of the embedded_query example, so CI compiles and runs it. The
CSR tab now uses the same in-memory graph instead of the on-disk one,
so both tabs print the same answer.
Add a how-to to the CSR page: refresh after writes, check csr_stats(),
and what forces a full rebuild instead of a delta, with Python and Rust
examples.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying lance-csr with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4291b2d
Status: ✅  Deploy successful!
Preview URL: https://c174671f.lance-csr.pages.dev
Branch Preview URL: https://docs-getting-started-rust-ta.lance-csr.pages.dev

View logs

@prrao87
prrao87 marked this pull request as ready for review October 30, 2026 14:48
@prrao87
prrao87 merged commit 8bf7986 into main Oct 30, 2026
8 checks passed
@prrao87
prrao87 deleted the docs/getting-started-rust-tabs branch October 30, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant