Add sync-first runtime bridge - #305
Draft
Saurabh Singh (saurabh500) wants to merge 1 commit into
Draft
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Saurabh Singh (saurabh500)
changed the base branch from
main
to
dev/saurabh500/tds-cursor-hot-path
August 15, 2026 18:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a supported
mssql_tds::runtime::block_on_sync_firstbridge for synchronous consumers of native TDS futures.The bridge pins exactly one future, polls it once under the supplied Tokio runtime with the standard no-op waker, returns directly when buffered work is ready, and otherwise resumes that same pinned future through
Runtime::block_on. Entered Tokio contexts are rejected before polling so a stateful protocol future cannot be partially advanced under an invalid fallback policy.This preserves strict row-at-a-time and column-at-a-time streaming. It does not batch, prefetch, or materialize whole rows.
Correctness coverage
TdsClientcursor decode with oneINTsplit across two gated TDS packetsPerformance context
The proof-of-concept ODBC integration improved the four-column streaming workload from approximately 265K to 435K rows/sec before the lower-layer cursor cleanup in #304. The ODBC adoption is intentionally deferred to the next stack layer.
Stack
mssql-odbcadoptionRelated Issues
Experimental follow-up to #303 and #304. Source performance context: #291 and #299.
Validation
cargo fmt --all -- --checkcargo clippy -p mssql-tds --frozen --all-features --all-targets -- -D warningsmssql-tdslibrary suite: 1,676 passed; 4 existing certificate-fixture failures (valid_cert.pem/valid_cert.derabsent)Checklist