Crates.io | odbc-sys |
lib.rs | odbc-sys |
version | 0.24.0 |
source | src |
created_at | 2017-03-19 22:34:05.473613 |
updated_at | 2023-11-22 06:53:17.729467 |
description | ODBC ffi bindings |
homepage | |
repository | https://github.com/pacman82/odbc-sys |
max_upload_size | |
id | 9055 |
size | 101,874 |
FFI (Foreign Function Interface) bindings for ODBC (Open Database Connectivity) As ffi bindings to C-APIs are low level by nature this library is intended to be the foundation of other libraries to build on top, rather than to be used directly.
This library will link against odbc32.dll
(preinstalled) on Windows systems. On Linux and macOS it links against libodbc.so
by default. This is typically provided by unix-odbc. Using the --feature iodbc
you can also link against libiodbc.so
. This may be interesting if you are trying to connect to some older data sources on macOS.
unix-odbc
Use your systems packet manager to install unixodbc-dev
. E.g. on Ubuntu / Debian
sudo apt install unixodbc-dev
On Intel based architectures you can install unix-odbc
using homebrew.
brew install unixodbc
Note for ARM based macOS Systems (M1 processors and later):
cargo build
is not going to pick up libodbc.so
installed via homebrew due to the fact that homebrew on ARM Mac installs into /opt/homebrew/Cellar
as opposed to /usr/local/opt/
.
You find documentation on what directories are searched during build here: https://doc.rust-lang.org/cargo/reference/environment-variables.html#dynamic-library-paths.
You can also install unixODBC from source:
./configure
make
make install
Thanks to @TBPixel for testing this!
As windows does ship with ODBC preinstalled, you are good to go out of the box.
Symbols are added to this library as we go along implementing uses cases in higher level APIs. If you miss something please do not hesitate to contribute.
Thanks to the folks of docs.rs for building and hosting the documentation!
Want to help out? Just create an issue or pull request.