Crates.io | mysqlclient-sys |
lib.rs | mysqlclient-sys |
version | 0.4.1 |
source | src |
created_at | 2017-02-16 14:36:55.861731 |
updated_at | 2024-08-23 07:08:31.199741 |
description | Auto-generated rust bindings for libmysqlclient |
homepage | |
repository | https://github.com/sgrif/mysqlclient-sys |
max_upload_size | |
id | 8541 |
size | 3,055,425 |
Autogenerated Rust bindings for libmysql-client (#include <mysql.h>
)
For this crate to build, libmysqlclient
must be installed on your system
(brew install mysql
on macOS, apt-get install libmysqlclient-dev
on Ubuntu,
included with the server distribution on Windows). Additionally, either
pkg-config
or mysql_config
must be present and able to successfully locate
libmysqlclient
.
The build script of the crate will attempt to find the lib path of libmysql-client using the following methods:
PKG_CONFIG_ALLOW_CROSS
, PKG_CONFIG_ALL_STATIC
etc., of the crate
pkg-config
apply.VCPKG_ROOT
environment variable to point to your Vcpkg installation and
run vcpkg install libmysql:x64-windows-static-md
to install the required libraries.
You need to set the MYSQLCLIENT_VERSION
to specify the installed version in this case.mysqlclient
is used unless MYSQLCLIENT_LIBNAME
environment
variable is specified.MYSQLCLIENT_LIB_DIR
and MYSQLCLIENT_VERSION
environment variables.pkg-config
, it will invoke the command
mysql_config --variable=pkglibdir
The crate will try to use pregenerated bindings for a variety of libmysqlclient versions and supported operating systems.
The buildtime_bindgen
feature allows you to generate bindings at build time matching your locally installed libmysqlclient version. It uses pkg-config
, vcpkg
, mysql_config
or the MYSQLCLIENT_INCLUDE_DIR
variable to determine the location of your mysql.h
header.
Additional bindgen configurations can be provided by setting the BINDGEN_EXTRA_CLANG_ARGS
variable.
All MYSQLCLIENT_*
environment can be post-fixed by a target to allow setting different values for different targets. For example MYSQLCLIENT_LIB_DIR_x86_64_unknown_linux_gnu
would set the MYSQLCLIENT_LIB_DIR
variable for the x86_64-unknown-linux-gnu
target. The MYSQLCLIENT_LIB_DIR
variable takes precedence before the target specific variants.
Licensed under either of
at your option.
The mysqlclient-src
crate is licensed under GPL-2.0
to match the license of the packed mysql source code.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.