| Crates.io | tds-protocol |
| lib.rs | tds-protocol |
| version | 0.6.0 |
| created_at | 2025-12-17 22:54:33.747501+00 |
| updated_at | 2026-01-13 22:17:20.47538+00 |
| description | Pure MS-TDS protocol implementation for SQL Server (no_std compatible) |
| homepage | |
| repository | https://github.com/praxiomlabs/rust-mssql-driver |
| max_upload_size | |
| id | 1991258 |
| size | 305,974 |
Part of the rust-mssql-driver project.
Pure Rust implementation of the MS-TDS (Tabular Data Stream) protocol used by Microsoft SQL Server.
This crate provides low-level, no_std-compatible protocol primitives for TDS versions 7.4 through 8.0. It is intentionally IO-agnostic and contains no networking or async runtime code.
no_std compatible - Works in embedded environments with allocThis crate is primarily used internally by mssql-client. Direct usage is for advanced scenarios:
use tds_protocol::{PacketHeader, PacketType, PacketStatus, PreLogin};
// Create a packet header
let header = PacketHeader::new(
PacketType::PreLogin,
PacketStatus::END_OF_MESSAGE,
100,
);
// Encode to bytes
let bytes = header.encode_to_bytes();
// Create PreLogin message
let prelogin = PreLogin::new()
.with_encryption(EncryptionLevel::Required);
let encoded = prelogin.encode();
| Module | Description |
|---|---|
packet |
TDS packet header encoding/decoding |
prelogin |
Pre-login negotiation messages |
login7 |
LOGIN7 authentication packet |
token |
Response token parsing (DONE, ERROR, COLMETADATA, ROW, etc.) |
rpc |
Remote procedure call encoding |
sql_batch |
SQL batch request encoding |
types |
TDS type identifiers and flags |
version |
TDS version definitions |
| Flag | Default | Description |
|---|---|---|
std |
Yes | Enable standard library |
alloc |
No | Enable allocation without std |
MIT OR Apache-2.0