Skip to content

docs: add python and rust tabs to the home page example - #89

Merged
prrao87 merged 1 commit into
mainfrom
docs/homepage-rust-tab
Oct 30, 2026
Merged

prrao87 merged 1 commit into
mainfrom
docs/homepage-rust-tab

Conversation

@prrao87

@prrao87 prrao87 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Why

The code example on the home page was Python only, even though lance-csr also ships as a Rust crate. Rust readers had to go to another page to see what the same query looks like in Rust.

What changed

  • The home page example now has Python and Rust tabs. Each tab has its own code block, so the copy button copies the code in the tab that is showing.
  • The Rust tab matches the Python example: the same three Person rows and two KNOWS edges, held in memory with EngineSource::Arrow, and the same [:KNOWS*1..2] query, which returns Bob and Carol.
  • As the docs guidelines require, the Rust code lives in a new quickstart section of the embedded_query example rather than in the page, so CI compiles and runs it. The tab shows only the body of the code, without its use lines, the same way the Rust guide does.

There are no API or behaviour changes. The only user-facing changes are the home page and the runnable example.

Validation

  • uv run --project docs --locked zensical build --strict: no issues. The built home page has both tabs and the Rust snippet.
  • uvx typos@1.26.0 .: clean.
  • docs/check_snippets.py against a local build: passes, including the Python block inside its tab.
  • cargo run -p lance-csr --example embedded_query: prints Bob and Carol, which matches the output comment.
  • cargo fmt --all -- --check and cargo clippy -p lance-csr --example embedded_query -- -D warnings: clean.
  • No benchmarks: no engine code changed.
  • I haven't tried the tabs or the copy button in a browser. CI is pending.

🤖 Generated with Claude Code

The home page showed only the Python example. Add a Rust tab whose code
comes from a new in-memory quickstart section of embedded_query.rs, so
CI compiles and runs it like the other Rust snippets.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Deploying lance-csr with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8d38252
Status: ✅  Deploy successful!
Preview URL: https://4f1517e7.lance-csr.pages.dev
Branch Preview URL: https://docs-homepage-rust-tab.lance-csr.pages.dev

View logs

@prrao87
prrao87 marked this pull request as ready for review October 30, 2026 14:36
@prrao87
prrao87 merged commit c272aa9 into main Oct 30, 2026
8 checks passed
@prrao87
prrao87 deleted the docs/homepage-rust-tab branch October 30, 2026 14:36
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