Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7a3d5dd
feat: TDS 8.0 strict encryption, hostname_in_certificate, client_name…
MattJackson Aug 29, 2026
fb4ea6e
docs: use docsrs cfg instead of a nightly-only docs feature
MattJackson Aug 29, 2026
6a26d1c
feat: expose TokenRow accessor on Row (#331)
MattJackson Aug 29, 2026
13d3795
feat: implement Sql conversion traits for more ColumnData types (#314)
MattJackson Aug 29, 2026
dd14c24
feat: coerce DateTime2 to datetime (Datetimen) under tds73 (#298, #30…
MattJackson Aug 29, 2026
368f800
feat: optional serde Serialize/Deserialize for result types (#115)
MattJackson Aug 29, 2026
c1a2424
feat: add ConfigBuilder for ergonomic Config construction (#366)
MattJackson Aug 29, 2026
f2d39d4
docs: add TDS protocol compatibility matrix
MattJackson Aug 29, 2026
bb8cc30
feat: expose column_metadata() + MetaDataColumn/identity accessors (#…
MattJackson Aug 29, 2026
183265f
feat(tds): decode and retain SESSIONSTATE (0xE4) token
MattJackson Aug 29, 2026
15cf7f4
feat(tds): handle COLINFO (0xA5) token in the stream
MattJackson Aug 29, 2026
509c6ed
feat(tds): decode FEDAUTHINFO (0xEE) token
MattJackson Aug 29, 2026
eb92215
feat(prelogin): emit INSTOPT and TRACEID options (MS-TDS §2.2.6.5)
MattJackson Aug 29, 2026
5c4ef7d
feat(tds): add Attention signal (0x06) and query cancellation
MattJackson Aug 29, 2026
83fcbb0
feat(tls): document TDS 8.0 ALPN limitation on opentls backend
MattJackson Aug 29, 2026
a6482a3
feat(tds): add TABNAME (0xA4) token support
MattJackson Aug 29, 2026
8050a9a
feat(tds): add CLR user-defined type (UDT) support
MattJackson Aug 29, 2026
5983e04
feat(tds): implement Transaction Manager request (packet type 0x14)
MattJackson Aug 29, 2026
a6433bc
feat(tds): decode SQL_VARIANT (0x62) column values
MattJackson Aug 29, 2026
32bdc16
fix: keep defensive token-stream fallback (allow unreachable_patterns)
MattJackson Aug 29, 2026
6f01dd2
feat(tds): decode ALTMETADATA and ALTROW tokens for COMPUTE BY
MattJackson Aug 29, 2026
bf66e9a
fix: allow(dead_code) on TDS ALPN const for opentls backend (no ALPN)
MattJackson Aug 29, 2026
77be111
docs(examples): add named pipes connection example
MattJackson Aug 29, 2026
ef207c2
feat(config): add MultiSubnetFailover support
MattJackson Aug 29, 2026
76b02fb
chore(deps): modernize dependencies to latest versions
MattJackson Aug 29, 2026
c2bc120
feat(auth): SSPI/NTLM Windows authentication on Unix via sspi-rs
MattJackson Aug 29, 2026
45c115b
feat(rpc): named-procedure RPC with OUT params and table-valued param…
MattJackson Aug 29, 2026
ff773a5
feat(tls): client-certificate (mutual TLS) authentication
MattJackson Aug 29, 2026
d6998e3
feat: re-export ConfigBuilder at the crate root
MattJackson Aug 29, 2026
05fda72
feat: encode SQL_VARIANT parameters
MattJackson Aug 29, 2026
079488a
fix: accept unknown COLMETADATA flag bits instead of rejecting the token
MattJackson Aug 29, 2026
ca1c2a4
refactor!: drop async-std; retarget dual-runtime tests to tokio + smol
MattJackson Aug 29, 2026
273c76e
docs: use distinct temp-table names in bulk_insert doctests
MattJackson Aug 29, 2026
0ce49f1
feat(tvp): rename derive macro crate to tiberius-macros; add user guide
MattJackson Sep 1, 2026
f430ac3
chore: scrub -ng identity from Cargo metadata, changelog, docs
MattJackson Sep 1, 2026
e23544d
fix(sync): reconcile wiring + config to compile the feature layer clean
MattJackson Sep 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 107 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,51 @@ jobs:
- name: Rustfmt
run: cargo fmt --check

cargo-test-linux:
msrv:
name: MSRV (1.88)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# Keep this in sync with `rust-version` in Cargo.toml.
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: "1.88"
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: Install dependencies
run: sudo apt-get install -y openssl libkrb5-dev
- name: Check on MSRV
run: cargo check --features all

semver:
name: semver-checks (advisory)
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
# Advisory during 0.x: reports API-breaking changes vs the target branch
# without blocking (breaking changes are allowed pre-1.0, but should be
# visible in review).
continue-on-error: true
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
fetch-depth: 0
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: Install dependencies
run: sudo apt-get install -y openssl libkrb5-dev
- name: Install cargo-semver-checks
uses: taiki-e/install-action@cargo-semver-checks
- name: Check for semver-breaking changes
run: cargo semver-checks --baseline-rev "origin/${{ github.base_ref }}"

smoke:
name: integration smoke (SQL 2022)
# Fast real-server signal on the dev lane; the full matrix runs on qa.
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/dev')
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -87,7 +131,68 @@ jobs:
- name: Run tests
run: cargo test ${{matrix.features}}

cargo-test-windows:
integration-linux-next:
name: linux (SQL 2025, experimental)
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/qa')
runs-on: ubuntu-latest
# Newest server; kept non-blocking so a not-yet-published image or a
# server-side behaviour change on the bleeding edge cannot red-wall qa.
continue-on-error: true
env:
TIBERIUS_TEST_CONNECTION_STRING: "server=tcp:localhost,1433;user=SA;password=<YourStrong@Passw0rd>;TrustServerCertificate=true"
RUSTFLAGS: "-Dwarnings"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: Start SQL Server 2025
run: DOCKER_BUILDKIT=1 docker compose -f docker-compose.yml up -d mssql-2025
- name: Install dependencies
run: sudo apt-get install -y openssl libkrb5-dev
- name: Wait for SQL Server
run: |
for _ in $(seq 1 45); do
if (echo > /dev/tcp/localhost/1433) 2>/dev/null; then
echo "SQL Server is accepting connections"; exit 0
fi
sleep 2
done
echo "SQL Server did not become ready in time" >&2; exit 1
- name: Run tests
run: cargo test --features=all

integration-macos:
name: macos build + unit tests
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/qa')
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
features:
- "--no-default-features --features=rustls,chrono,time,tds73,sql-browser-tokio,sql-browser-smol,rust_decimal,bigdecimal"
- "--no-default-features --features=vendored-openssl"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
# No live SQL Server on hosted macOS runners; this verifies the crate
# builds and its unit tests pass on macOS/Apple targets.
- name: Build
run: cargo build ${{ matrix.features }}
- name: Run library unit tests
run: cargo test --lib ${{ matrix.features }}

integration-windows:
name: windows (SQL 2019, integrated auth)
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/qa')
runs-on: windows-latest

strategy:
Expand Down
89 changes: 55 additions & 34 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,12 @@ repository = "https://github.com/prisma/tiberius"
version = "0.12.3"

[workspace]
members = ["runtimes-macro"]
members = ["runtimes-macro", "tiberius-macros"]

[[test]]
path = "tests/query.rs"
name = "query"

[[test]]
path = "tests/named-instance-async.rs"
name = "named-instance-async"
required-features = ["sql-browser-async-std"]

[[test]]
path = "tests/named-instance-tokio.rs"
name = "named-instance-tokio"
Expand All @@ -37,31 +32,36 @@ path = "tests/named-instance-smol.rs"
name = "named-instance-smol"
required-features = ["sql-browser-smol"]

[[example]]
name = "named-pipes"
path = "examples/named-pipes.rs"

[dependencies]
enumflags2 = "0.7"
byteorder = "1.0"
encoding_rs = "0.8"
once_cell = "1.3"
thiserror = "1.0"
thiserror = "2"
bytes = "1.0"
pretty-hex = "0.3"
pretty-hex = "0.4"
pin-project-lite = "0.2"
asynchronous-codec = "0.6"
asynchronous-codec = "0.7"
async-trait = "0.1"
connection-string = "0.2"
num-traits = "0.2"
uuid = "1.0"
zeroize = "1.8.2"

[target.'cfg(windows)'.dependencies]
winauth = { version = "0.0.4", optional = true }
winauth = { version = "0.0.5", optional = true }

[target.'cfg(unix)'.dependencies]
libgssapi = { version = "0.8.1", optional = true, default-features = false }
libgssapi = { version = "0.11", optional = true, default-features = false }
sspi = { version = "0.18", optional = true }
libc = "0.2"

[dependencies.async-native-tls]
version = "0.4"
features = ["runtime-async-std"]
version = "0.6"
optional = true

[dependencies.tokio]
Expand All @@ -74,11 +74,6 @@ version = "0.7"
features = ["compat"]
optional = true

[dependencies.async-std]
version = "1"
optional = true
features = ["attributes"]

[dependencies.chrono]
version = "0.4"
optional = true
Expand All @@ -102,20 +97,25 @@ version = "1.6"
optional = true

[dependencies.bigdecimal_]
version = "0.3"
version = "0.4"
optional = true
package = "bigdecimal"

[dependencies.serde]
version = "1.0"
optional = true
features = ["derive", "rc"]

[dependencies.async-io]
version = "1.8"
version = "2"
optional = true

[dependencies.async-net]
version = "1.7"
version = "2"
optional = true

[dependencies.futures-lite]
version = "1.12.0"
version = "2"
optional = true

[dependencies.tokio-rustls]
Expand Down Expand Up @@ -151,50 +151,71 @@ features = [
]
version = "1.0"

[dev-dependencies.async-std]
features = ["attributes"]
version = "1"
[dev-dependencies.smol]
version = "2"

[dev-dependencies.runtimes-macro]
path = "./runtimes-macro"

[dependencies.tiberius-macros]
path = "./tiberius-macros"
version = "0.1.0"

[dev-dependencies]
names = "0.14"
anyhow = "1"
env_logger = "0.11"
azure_identity = "0.20.0"
azure_identity = "1.0"
azure_core = "1"
oauth2 = "5.0"
url = "2.2.2"
reqwest = "0.12"
url = "2.5"
reqwest = "0.13"
paste = "1.0"
indicatif = "0.18"
chrono = "0.4.38"
indoc = "1.0.7"
indoc = "2"
serde_json = "1.0"

[package.metadata.docs.rs]
features = ["all", "docs"]
features = ["all"]
# docs.rs builds on nightly with this cfg set, enabling #[doc(cfg(...))]
# annotations (feature(doc_cfg)) without requiring nightly for normal builds.
rustdoc-args = ["--cfg", "docsrs"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docsrs)'] }

[features]
all = [
"chrono",
"time",
"tds73",
"sql-browser-async-std",
"tds80",
"sql-browser-tokio",
"sql-browser-smol",
"integrated-auth-gssapi",
"rust_decimal",
"bigdecimal",
"native-tls",
"serde",
"sspi-rs",
]
default = ["tds73", "winauth", "native-tls"]
default = ["tds80", "winauth", "native-tls"]
tds73 = []
docs = []
sql-browser-async-std = ["async-std"]
# Enables TDS 8.0 support, including the `Strict` encryption level (TLS before
# the TDS prelogin, TDS 8.0 "strict" mode). Requires a TLS backend.
tds80 = ["tds73"]
sql-browser-tokio = ["tokio", "tokio-util"]
sql-browser-smol = ["async-io", "async-net", "futures-lite"]
integrated-auth-gssapi = ["libgssapi"]
bigdecimal = ["bigdecimal_"]
rustls = ["tokio-rustls", "tokio-util", "rustls-native-certs"]
native-tls = ["async-native-tls"]
vendored-openssl = ["opentls"]
# Enables Windows-style SSPI/NTLM authentication (`AuthMethod::Windows`) on Unix
# platforms without requiring Kerberos, via the pure-Rust `sspi` crate. On
# Windows the same authentication is provided by the `winauth` feature.
sspi-rs = ["sspi"]
# Optional serde Serialize/Deserialize impls for query result types
# (Row, Column, ColumnData, Numeric, ColumnType and time/xml types).
serde = ["dep:serde", "uuid/serde"]
7 changes: 0 additions & 7 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,11 @@
[advisories]
yanked = "deny"
ignore = [
# async-std is discontinued upstream. In tiberius it is reachable ONLY through
# the opt-in `sql-browser-async-std` feature (and dev-deps); it is not part of
# the default build. Tracked for migration to smol/tokio.
{ id = "RUSTSEC-2025-0052", reason = "async-std: opt-in `sql-browser-async-std` feature + dev-deps only; not in the default shipped graph" },

# The following are ALL dev-dependency-only (test harness + the aad-auth
# example) and are never compiled into the published library.
{ id = "RUSTSEC-2024-0375", reason = "atty: dev-dependency only (via `names` -> clap 3); not shipped" },
{ id = "RUSTSEC-2024-0370", reason = "proc-macro-error: dev-dependency only (via `names` -> clap 3); not shipped" },
{ id = "RUSTSEC-2024-0384", reason = "instant: transitive dev-dependency only; not shipped" },
{ id = "RUSTSEC-2024-0436", reason = "paste: dev/test only (tests/bulk.rs + azure_identity example); not shipped" },
{ id = "RUSTSEC-2026-0174", reason = "http-types: dev-only via azure_identity in the aad-auth example; not shipped" },
]

[bans]
Expand Down
Loading
Loading