10 releases

new 0.3.0 May 17, 2024
0.2.5 Jan 28, 2022
0.2.4 Feb 22, 2019
0.2.3 Jul 4, 2017
0.1.2 Feb 16, 2017

#1105 in Database interfaces

Download history 7572/week @ 2024-01-26 7872/week @ 2024-02-02 8666/week @ 2024-02-09 7806/week @ 2024-02-16 8136/week @ 2024-02-23 7940/week @ 2024-03-01 7896/week @ 2024-03-08 7102/week @ 2024-03-15 7375/week @ 2024-03-22 6785/week @ 2024-03-29 7360/week @ 2024-04-05 6893/week @ 2024-04-12 9115/week @ 2024-04-19 10895/week @ 2024-04-26 11083/week @ 2024-05-03 10013/week @ 2024-05-10

42,178 downloads per month
Used in 55 crates (via diesel)

MIT/Apache and maybe GPL-2.0

14MB
266K SLoC

C++ 174K SLoC // 0.2% comments Rust 63K SLoC // 0.0% comments C 20K SLoC // 0.2% comments Shell 4K SLoC // 0.2% comments M4 3.5K SLoC // 0.2% comments Puppet 1K SLoC // 0.0% comments Bitbake 196 SLoC // 0.0% comments Automake 130 SLoC // 0.1% comments AWK 106 SLoC // 0.0% comments GNU Style Assembly 92 SLoC // 0.2% comments LLVM 66 SLoC Visual Studio Project 45 SLoC Batch 10 SLoC Visual Studio Solution 6 SLoC

mysqlclient-sys

Autogenerated Rust bindings for libmysql-client (#include <mysql.h>)

Building

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:

  • First, it will attempt to use pkg-config to locate it. All the config options, such as PKG_CONFIG_ALLOW_CROSS, PKG_CONFIG_ALL_STATIC etc., of the crate pkg-config apply.
  • MSVC ABI builds will then check for a Vcpkg installation using the vcpkg cargo build helper. Set the VCPKG_ROOT environment variable to point to your Vcpkg installation and run vcpkg install libmysql:x64-windows to install the required libraries.
  • If the library cannot be found by using the steps above the build script will check the MYSQLCLIENT_LIB_DIR and MYSQLCLIENT_VERSION environment variables
  • If the library cannot be found using 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.

License

Licensed under either of

at your option.

Contribution

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.

Dependencies

~0–4.5MB
~114K SLoC