A Rust implementation of the Tabular Data Stream (TDS) protocol used by Microsoft SQL Server. This library provides a foundational protocol layer to power SQL connectivity across multiple language bindings.
The mssql-tds crate implements the TDS protocol from the ground up in Rust, providing a high-performance, memory-safe core that can be shared across driver ecosystems. The project is organized as a Cargo workspace:
| Crate | Purpose |
|---|---|
mssql-tds |
Core TDS protocol library |
mssql-js |
(Experimental) Node.js bindings via NAPI-RS |
mssql-tds-cli |
Interactive CLI client tool |
mssql-mock-tds |
Mock TDS server for testing |
- Rust (version specified in
rust-toolchain.toml) - A C linker and OpenSSL development headers (e.g.,
build-essential,libssl-devon Debian/Ubuntu) - cargo-nextest for running tests:
cargo install cargo-nextest --locked - Docker (optional, for running a local SQL Server instance)
git clone <repo-url>
cd mssql-rs
cargo buildInstall pre-commit hooks that run formatting and lint checks automatically:
./dev/setup-hooks.shBuild the workspace:
cargo buildBefore submitting changes, run the full check suite:
cargo bfmt # Format check
cargo bclippy # Lint (warnings are errors)
cargo btest # Test with cargo-nextestThese aliases are defined in .cargo/config.toml. The mssql-py-core crate is excluded from the workspace and requires separate fmt/clippy runs via the scripts in scripts/.
This project is not currently accepting external pull requests. See CONTRIBUTING.md for details.
Bug reports and feature requests are welcome through GitHub Issues.
See SUPPORT.md for information on how to get help.
Please report security vulnerabilities through the Microsoft Security Response Center (MSRC). See SECURITY.md for details.
This project has adopted the Microsoft Open Source Code of Conduct. See CODE_OF_CONDUCT.md for more information.
This project is licensed under the MIT License.