Skip to content

Commit

Permalink
Merge pull request #12 from MutinyWallet/vendored-feature
Browse files Browse the repository at this point in the history
Add feature flag for vendored sqlcipher
  • Loading branch information
TonyGiorgio authored May 14, 2024
2 parents 8643d13 + fbc667c commit 0e24b04
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/target
.env
harbor.sqlite
24 changes: 24 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name = "harbor"
version = "0.1.0"
edition = "2021"

[features]
default = []
vendored = ["rusqlite/bundled-sqlcipher-vendored-openssl"]

[dependencies]
anyhow = "1"
log = "0.4"
Expand Down
Binary file removed harbor.sqlite
Binary file not shown.
14 changes: 10 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
test:
cargo test
# Load environment variables from .env file
set dotenv-load := true

# Define a variable that holds the feature flag if USE_VENDOR_FEATURE is set
FEATURE_FLAG := if env('USE_VENDOR_FEATURE', '0') == "1" { "--features vendored" } else { "" }

run:
RUST_LOG=harbor=debug,info cargo run
RUST_LOG=harbor=debug,info cargo run {{FEATURE_FLAG}}

test:
cargo test {{FEATURE_FLAG}}

release:
cargo run --release
cargo run --release {{FEATURE_FLAG}}

clippy:
cargo clippy --all-features --tests -- -D warnings
Expand Down

0 comments on commit 0e24b04

Please sign in to comment.