Skip to content

Commit

Permalink
Merge pull request #107 from blackbeam/binlog-feature
Browse files Browse the repository at this point in the history
Hide binlog behind a feature
  • Loading branch information
blackbeam authored Oct 11, 2023
2 parents 84a9e63 + 45ca204 commit 4f9e378
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ jobs:
run: cargo fmt -- --check
- name: Features subsets
run: |
ruby -e "fs=['bigdecimal02', 'bigdecimal', 'chrono', 'rust_decimal', 'time02', 'time', 'frunk', 'derive']; \
ruby -e "fs=['bigdecimal02', 'bigdecimal', 'bigdecimal04', 'chrono', 'rust_decimal', 'time02', 'time', 'frunk', 'derive', 'binlog']; \
(1..fs.length).each do |n| puts fs.combination(n).to_a.map {|x| x.join(\" \")}.join(\"\n\"); end" \
| while read -r line; do \
echo "$line" && cargo check --quiet --tests --no-default-features --features "flate2/zlib test $line"; \
rm -rf target/debug/incremental; \
done
- name: Build
run: cargo build
Expand Down
13 changes: 12 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,18 @@ subprocess = "0.2"
debug = true

[features]
default = ["flate2/zlib", "bigdecimal", "rust_decimal", "time", "frunk", "derive"]
default = [
"flate2/zlib",
"bigdecimal",
"rust_decimal",
"time",
"frunk",
"derive",
"binlog",
]
test = ["derive"]
derive = ["mysql-common-derive"]
binlog = []
nightly = ["test"]

[package.metadata.docs.rs]
Expand All @@ -100,6 +109,8 @@ features = [
"rust_decimal",
"chrono",
"bigdecimal02",
"bigdecimal04",
"bigdecimal",
"derive",
"binlog",
]
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@
//! | -------------- | ---------------------------------------------------- | ------- |
//! | `bigdecimal02` | Enables `bigdecimal` v0.2.x types support | πŸ”΄ |
//! | `bigdecimal` | Enables `bigdecimal` v0.3.x types support | 🟒 |
//! | `bigdecimal04` | Enables `bigdecimal` v0.4.x types support | πŸ”΄ |
//! | `chrono` | Enables `chrono` types support | πŸ”΄ |
//! | `rust_decimal` | Enables `rust_decimal` types support | 🟒 |
//! | `time02` | Enables `time` v0.2.x types support | πŸ”΄ |
//! | `time` | Enables `time` v0.3.x types support | 🟒 |
//! | `frunk` | Enables `FromRow` for `frunk::Hlist!` types | 🟒 |
//! | `derive` | Enables [`FromValue` and `FromRow` derive macros][2] | 🟒 |
//! | `binlog` | Binlog-related functionality | 🟒 |
//!
//! # Derive Macros
//!
Expand Down Expand Up @@ -473,6 +475,8 @@ pub mod row;
pub mod scramble;
pub mod value;

#[cfg(feature = "binlog")]
#[cfg_attr(docsrs, doc(cfg(feature = "binlog")))]
pub mod binlog;

#[cfg(test)]
Expand Down

0 comments on commit 4f9e378

Please sign in to comment.