Skip to content

FEAT: Add mssql-python-rust-odbc packaging for the Rust ODBC provider - #738

Draft
gargsaumya wants to merge 5 commits into
saumya/rust-odbc-optinfrom
saumya/rust-odbc-packaging
Draft

FEAT: Add mssql-python-rust-odbc packaging for the Rust ODBC provider#738
gargsaumya wants to merge 5 commits into
saumya/rust-odbc-optinfrom
saumya/rust-odbc-packaging

Conversation

@gargsaumya

@gargsaumya gargsaumya commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Work Item / Issue Reference

AB#47796


Summary

Adds the mssql-python-rust-odbc packaging pipeline: a standalone mssql_python_rust_odbc package and setup_rust_odbc.py that build a platform-specific wheel shipping the mssql-odbc (Rust) driver binaries, mirroring the existing mssql-python-odbc classic-driver packaging. Adds eng/scripts/sync-mssql-odbc-native-libs.py to vendor binaries from the mssql-odbc-native NuGet package published by mssql-rs, wires an opt-in rust-odbc extra into setup.py (structural only -- no stable mssql-odbc-native release exists yet), and adds a smoke test loading the real packaged binary through the native loader.

Stacked on #730 (provider selection mechanism) -- depends on it; base branch is saumya/rust-odbc-optin, not main.

Changes

  • mssql_python_rust_odbc/ -- new package, ships committed driver binaries for win x64/arm64 and linux glibc/musl x64/arm64
  • setup_rust_odbc.py -- builds the platform-specific wheel; validated for all 6 target platform/arch combos via env-var cross-build overrides
  • eng/scripts/sync-mssql-odbc-native-libs.py + eng/versions/mssql-odbc-native.version -- vendors binaries from the pinned mssql-odbc-native NuGet version
  • setup.py -- opt-in rust-odbc extra, excluded from find_packages()
  • tests/test_026_odbc_provider.py -- smoke test proving the real binary loads via the native loader (not just a path check)

Testing

  • tests/test_026_odbc_provider.py passes (24/24)
  • Real wheel built and installed for all 6 platform/arch targets
  • black --check passes on all touched files

- New mssql_python_rust_odbc package + setup_rust_odbc.py, building
  platform-specific wheels from the committed libs/ binaries (mirrors
  setup_odbc.py / mssql_python_odbc).
- eng/scripts/sync-mssql-odbc-native-libs.py vendors the binaries from the
  mssql-odbc-native NuGet package (mssql-rs); eng/versions pins the version.
- setup.py: opt-in 'rust-odbc' extras_require, excluded from find_packages
  (no stable mssql-odbc-native release yet, so this is structural only).
- tests/test_026_odbc_provider.py: smoke test loading the real packaged
  binary via the native loader.
@github-actions github-actions Bot added the pr-size: large Substantial code update label Sep 2, 2026
@gargsaumya
gargsaumya marked this pull request as ready for review September 2, 2026 08:27
@gargsaumya
gargsaumya marked this pull request as draft September 2, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-size: large Substantial code update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant