This Unix-only fork of mysqlclient-sys contains prebuilt static binary libmariadbclient.a
(which is compatible with libmysqlclient.a
) and links to it. You can rebuild the binary - see vagga.yaml
for an Alpine container instruction and native/build.sh
for build commands.
To use it in your Diesel project, add this to Cargo.toml
:
[patch.crates-io]
mysqlclient-sys = { git = "https://github.com/pzmarzly/mysqlclient-sys", rev = "acd1b2b" }
Tested with musl + Rocket + diesel! (Tip: install musl-gcc
and put
[build]
target = "x86_64-unknown-linux-musl"
to your project's .cargo/config
).
Please note that libmariadbclient
is licensed under LGPLv2.1. If you publicly distribute your statically-linked Rust program, you will need to let users relink it. Text of LGPLv2.1 is in native/COPYING.LIB
.
Autogenerated Rust bindings for libmysql-client (#include <mysql.h>
)
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Exception: native/libmysqlclient.a
is licensed under LGPLv2.1.
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.