tursodatabase / tursodatabase/libsql

libsql client: cursor improvements

Open
#822 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

  • Rewrite theCursor introduced in #750 in terms of async-stream lib.
  • Replace the futures::Mutex with tokio::sync::Mutex and custom line splitter with tokio-utils LinesCodec. This needs to be validated against Cloudflare workers and possibly other WASM targets.
  • See if it's possible to change HttpSend trait to use to make url/auth_token into generic types. This is to reduce copying. However Cloudflare target uses &str in both cases, while hyper uses Uri/HeaderValue. I tried to do it initially, but haven't got enough time to finish it.

Please keep in mind, that projects running in Cloudflare workers are usually build via wrangler, which is not part of the CI pipeline and may potentially be different from calling cargo.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Cursor introduced in #750 and the existing HttpSend trait. Compare the unchecked async-stream rewrite and generic url/auth_token proposal with the completed tokio::sync::Mutex and LinesCodec changes. Done means resolving the remaining checklist items and validating the client for Cloudflare Workers and other WASM targets, including a wrangler build.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
backend, databases
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.