#odbc #database #sql


Write low level, fast ODBC Applications in safe Rust

11 releases

Uses old Rust 2015

0.5.0 Dec 18, 2019
0.4.2 Nov 10, 2019
0.4.1 Mar 13, 2018
0.4.0 Sep 1, 2017
0.1.0 Aug 13, 2017

#489 in Database interfaces

Download history 421/week @ 2020-09-25 588/week @ 2020-10-02 485/week @ 2020-10-09 739/week @ 2020-10-16 535/week @ 2020-10-23 697/week @ 2020-10-30 376/week @ 2020-11-06 538/week @ 2020-11-13 538/week @ 2020-11-20 529/week @ 2020-11-27 332/week @ 2020-12-04 583/week @ 2020-12-11 449/week @ 2020-12-18 106/week @ 2020-12-25 354/week @ 2021-01-01 305/week @ 2021-01-08

2,042 downloads per month
Used in 6 crates (2 directly)

MIT license

1.5K SLoC


Build Status Docs MIT licensed Published


This Rust crate builds upon the FFI (Foreign Function Interface) bindings for ODBC (Open Database Connectivity) provided by odbc-sys. It enables you to write ODBC Applications entirely in safe Rust. While this crate tries to prevent all kinds of erros it does very little to hide the complexity of ODBC, as it tries to be the smallest safe layer around odbc-sys. Therfore code written with this library is likely to be safe, but unlikely to look like idiomatic Rust. For a library offering greater convinience have a look at odbc-rs.

Design Goals

  • Zero cost abstraction
  • Catch Invalid Handle Errors at compile time
  • Prevent bound buffers or columns from going out of scope
  • Catch Function Sequence Errors at compile time
  • Not to abstract away any power of the underlying API

Current State

This library currently supports:

  • Direct execution of queries
  • Prepared execution of queries
  • Binding parameters
  • Retrieving Result Sets (kind of slow via SQLGetData)

Currently unsupported:

  • Binding columns to Result Sets
  • Multi threading and asynchronous capabilities


Thanks to the folks of docs.rs for building and hosting the documentation!


Want to help out? Just create an issue, pull request or contact markus.klein@live.de.