Skip to content

Add support for std::future and async/await #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Sep 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 43 additions & 42 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ jobs:
type: string
flavor:
type: string
test-ssl:
type: boolean
default: false
test-unstable:
type: boolean
default: false
Expand All @@ -34,65 +31,69 @@ jobs:
- /usr/local/cargo/registry/index
- restore_cache:
key: deps-<< parameters.rust >>-{{ checksum "Cargo.lock" }}
- run: cargo test
- when:
condition: << parameters.test-ssl >>
steps:
- run: cargo test --features ssl
- run: rustup component add rustfmt
- run: cargo fmt -- --check
# - run: cargo test
# - when:
# condition: << parameters.test-ssl >>
# steps:
# - run: cargo test --features ssl
# - run: rustup component add rustfmt
# - run: cargo fmt -- --check
- save_cache:
key: deps-<< parameters.rust >>-{{ checksum "Cargo.lock" }}
paths:
- /usr/local/cargo/registry/cache
- when:
condition: << parameters.test-unstable >>
steps:
- run:
name: Beta
command: |
rustup toolchain install beta
cargo +beta test
# - run:
# name: Beta
# command: |
# rustup toolchain install beta
# cargo +beta test
- run:
name: Nightly
command: |
rustup toolchain install nightly
cargo +nightly test
- run:
name: Nightly SSL
command: cargo +nightly test
environment:
SSL: 1


workflows:
test:
jobs:
- linux:
name: stable-mysql-5.6
rust: latest
flavor: mysql
version: "5.6"
- linux:
name: stable-mysql-5.7
rust: latest
flavor: mysql
version: "5.7"
test-ssl: true
# - linux:
# name: stable-mysql-5.6
# rust: latest
# flavor: mysql
# version: "5.6"
# - linux:
# name: stable-mysql-5.7
# rust: latest
# flavor: mysql
# version: "5.7"
# test-ssl: true
- linux:
name: stable-mysql-8.0
rust: latest
flavor: mysql
version: "8.0"
test-ssl: true
test-unstable: true
- linux:
name: stable-mariadb-5.5
rust: latest
flavor: mariadb
version: "5.5"
- linux:
name: stable-mariadb-10.3
rust: latest
flavor: mariadb
version: "10.3"
- linux:
name: stable-mariadb-10.4
rust: latest
flavor: mariadb
version: "10.4"
# - linux:
# name: stable-mariadb-5.5
# rust: latest
# flavor: mariadb
# version: "5.5"
# - linux:
# name: stable-mariadb-10.3
# rust: latest
# flavor: mariadb
# version: "10.3"
# - linux:
# name: stable-mariadb-10.4
# rust: latest
# flavor: mariadb
# version: "10.4"
21 changes: 11 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "MIT/Apache-2.0"
name = "mysql_async"
readme = "README.md"
repository = "https://github.com/blackbeam/mysql_async"
version = "0.20.0"
version = "0.21.0-alpha.1"
exclude = ["test/*"]
edition = "2018"

Expand All @@ -19,19 +19,21 @@ crossbeam = "0.7"
failure = "0.1"
failure_derive = "0.1"
fnv = "1"
futures = "0.1.18"
futures-core-preview = "0.3.0-alpha.18"
futures-util-preview = "0.3.0-alpha.18"
futures-sink-preview = "0.3.0-alpha.18"
mio-named-pipes = "0.1.6"
mysql_common = "0.18"
native-tls = { version = "0.2", optional = true }
native-tls = "0.2"
percent-encoding = "2.1.0"
pin-project = { version = "0.4.0-alpha.11", features = ["project_attr"] }
regex = "1"
serde = "1"
serde_json = "1"
tokio = "0.1.9"
tokio-codec = "0.1"
tokio-io = "0.1"
tokio-named-pipes = "0.1"
tokio-uds = "0.2"
tokio-sync = "0.1"
# we only need rt-full for tokio::spawn
tokio = { version = "0.2.0-alpha.5", default-features = false, features = ["codec", "io", "net", "sync", "fs", "rt-full"] }
tokio-tls = "0.3.0-alpha.5"
tokio-net = "0.2.0-alpha.5"
twox-hash = "1"
url = "2.1"

Expand All @@ -40,7 +42,6 @@ lazy_static = "1"

[features]
nightly = []
ssl = ['native-tls']

[lib]
name = "mysql_async"
Expand Down
32 changes: 16 additions & 16 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ environment:
PATH: C:\msys64\mingw64\bin\;c:\rust\bin;%PATH%
- TARGET: nightly-i686-pc-windows-gnu
PATH: C:\msys64\mingw32\bin\;c:\rust\bin;%PATH%
- TARGET: beta-x86_64-pc-windows-msvc
PATH: C:\msys64\mingw64\bin\;c:\rust\bin;%PATH%
- TARGET: beta-i686-pc-windows-msvc
PATH: C:\msys64\mingw32\bin\;c:\rust\bin;%PATH%
- TARGET: beta-x86_64-pc-windows-gnu
PATH: C:\msys64\mingw64\bin\;c:\rust\bin;%PATH%
- TARGET: beta-i686-pc-windows-gnu
PATH: C:\msys64\mingw32\bin\;c:\rust\bin;%PATH%
- TARGET: 1.34.0-x86_64-pc-windows-msvc
PATH: C:\msys64\mingw64\bin\;c:\rust\bin;%PATH%
- TARGET: 1.34.0-i686-pc-windows-msvc
PATH: C:\msys64\mingw32\bin\;c:\rust\bin;%PATH%
- TARGET: 1.34.0-x86_64-pc-windows-gnu
PATH: C:\msys64\mingw64\bin\;c:\rust\bin;%PATH%
- TARGET: 1.34.0-i686-pc-windows-gnu
PATH: C:\msys64\mingw32\bin\;c:\rust\bin;%PATH%
# - TARGET: beta-x86_64-pc-windows-msvc
# PATH: C:\msys64\mingw64\bin\;c:\rust\bin;%PATH%
# - TARGET: beta-i686-pc-windows-msvc
# PATH: C:\msys64\mingw32\bin\;c:\rust\bin;%PATH%
# - TARGET: beta-x86_64-pc-windows-gnu
# PATH: C:\msys64\mingw64\bin\;c:\rust\bin;%PATH%
# - TARGET: beta-i686-pc-windows-gnu
# PATH: C:\msys64\mingw32\bin\;c:\rust\bin;%PATH%
# - TARGET: 1.34.0-x86_64-pc-windows-msvc
# PATH: C:\msys64\mingw64\bin\;c:\rust\bin;%PATH%
# - TARGET: 1.34.0-i686-pc-windows-msvc
# PATH: C:\msys64\mingw32\bin\;c:\rust\bin;%PATH%
# - TARGET: 1.34.0-x86_64-pc-windows-gnu
# PATH: C:\msys64\mingw64\bin\;c:\rust\bin;%PATH%
# - TARGET: 1.34.0-i686-pc-windows-gnu
# PATH: C:\msys64\mingw32\bin\;c:\rust\bin;%PATH%
services: mysql
install:
- cmd: >-
Expand Down
1 change: 1 addition & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
edition = "2018"
Loading