Skip to content

Latest commit

 

History

History
79 lines (50 loc) · 2.47 KB

File metadata and controls

79 lines (50 loc) · 2.47 KB

mssql-rs

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.

Overview

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

Getting Started

Prerequisites

  • Rust (version specified in rust-toolchain.toml)
  • A C linker and OpenSSL development headers (e.g., build-essential, libssl-dev on Debian/Ubuntu)
  • cargo-nextest for running tests: cargo install cargo-nextest --locked
  • Docker (optional, for running a local SQL Server instance)

Clone and Build

git clone <repo-url>
cd mssql-rs
cargo build

Git Hooks Setup

Install pre-commit hooks that run formatting and lint checks automatically:

./dev/setup-hooks.sh

Local Build

Build the workspace:

cargo build

Before submitting changes, run the full check suite:

cargo bfmt       # Format check
cargo bclippy    # Lint (warnings are errors)
cargo btest      # Test with cargo-nextest

These 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/.

Contributing

This project is not currently accepting external pull requests. See CONTRIBUTING.md for details.

Bug reports and feature requests are welcome through GitHub Issues.

Support

See SUPPORT.md for information on how to get help.

Security

Please report security vulnerabilities through the Microsoft Security Response Center (MSRC). See SECURITY.md for details.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. See CODE_OF_CONDUCT.md for more information.

License

This project is licensed under the MIT License.