Skip to content

Commit

Permalink
Merge pull request #44 from sgrif/release/prepare_0_3_0
Browse files Browse the repository at this point in the history
Prepare a 0.3.0 release
  • Loading branch information
weiznich committed May 17, 2024
2 parents 54e1149 + 7ea5493 commit 1eee554
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 17 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,20 @@ jobs:
run: |
cargo test --no-default-features --features "${{ matrix.features }}"
- name: Test compile diesel
shell: bash
run: |
cargo new test_diesel
cd test_diesel
echo "[workspace]" >> Cargo.toml
cargo add diesel --no-default-features --features "mysql" --git "https://github.com/weiznich/diesel/" --branch "fix/mysql_troubles"
cargo add mysqlclient-sys
echo "[patch.crates-io]" >> Cargo.toml
echo "mysqlclient-sys = { path = \"..\" }" >> Cargo.toml
cat Cargo.toml
echo "use diesel::prelude::*;" > src/main.rs
echo "fn main() { MysqlConnection::establish(\"foo\").unwrap(); }" >> src/main.rs
cargo build --features "mysqlclient-sys/${{ matrix.features }}"
# - name: Test compile diesel
# shell: bash
# run: |
# cargo new test_diesel
# cd test_diesel
# echo "[workspace]" >> Cargo.toml
# cargo add diesel --no-default-features --features "mysql" --git "https://github.com/weiznich/diesel/" --branch "fix/mysql_troubles"
# cargo add mysqlclient-sys
# echo "[patch.crates-io]" >> Cargo.toml
# echo "mysqlclient-sys = { path = \"..\" }" >> Cargo.toml
# cat Cargo.toml
# echo "use diesel::prelude::*;" > src/main.rs
# echo "fn main() { MysqlConnection::establish(\"foo\").unwrap(); }" >> src/main.rs
# cargo build --features "mysqlclient-sys/${{ matrix.features }}"

- name: Test all files included
shell: bash
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Change Log
All user visible changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/), as described
for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md)


## [0.3.0] 2024-05-17

### Added

- We added a `mysqlclient-src` crate and a `bundled` feature for `mysqlclient-sys`. This allows to build and link a static version of libmysqlclient during the rust build process. This feature currently supports targeting Windows, Linux and macOS. It requires a c++ compiler toolchain and cmake to build libmysqlclient from source.
- We added a `buildtime_bindgen` feature flag that allows to generate bindings for your locally installed libmysqlclient version. This is helpful for cases where the target architecture is significantly different to what the built-in bindings assume.


### Changed

- We regenerated the bundled bindings for several libmysqlclient versions. You might now need to set the `MYSQLCLIENT_VERSION` environment to select the matching bindings for your libmysqlclient version
8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
[package]
name = "mysqlclient-sys"
version = "0.2.5"
authors = ["Sean Griffin <sean@seantheprogrammer.com>"]
version = "0.3.0"
description = "Auto-generated rust bindings for libmysqlclient"
license = "MIT OR Apache-2.0"
repository = "https://github.com/sgrif/mysqlclient-sys"
documentation = "https://docs.rs/mysqlclient-sys"
build = "build.rs"
links = "mysqlclient"
edition = "2021"
keywords = ["bindings", "libmysqlclient", "mysqlclient-sys"]
categories = ["database", "external-ffi-bindings"]

[build-dependencies]
pkg-config = "0.3.9"
bindgen = { version = "0.69.4", optional = true }

[dependencies]
mysqlclient-src = { path = "mysqlclient-src", optional = true }
mysqlclient-src = { version = "0.1.0", path = "mysqlclient-src", optional = true }

[target.'cfg(target_env = "msvc")'.build-dependencies]
vcpkg = "0.2.4"
Expand Down
8 changes: 8 additions & 0 deletions mysqlclient-src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ name = "mysqlclient-src"
version = "0.1.0"
edition = "2021"
build = "build.rs"
description = "Bundled version of libmysqlclient"
license = "GPL-2.0"
documentation = "https://docs.rs/mysqlclient-src/"
repository = "https://github.com/sgrif/mysqlclient-sys"
links = "mysqlclient_sys_src"
keywords = ["bindings", "libmysqlclient", "mysqlclient-sys", "bundled"]
categories = ["database", "external-ffi-bindings"]

include = [
"/build.rs",
"/src",
Expand Down
1 change: 1 addition & 0 deletions mysqlclient-src/README.md

0 comments on commit 1eee554

Please sign in to comment.