diff --git a/.gitignore b/.gitignore index ea8c4bf..9037669 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /target +.env +harbor.sqlite diff --git a/Cargo.lock b/Cargo.lock index c106249..71caeab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3336,6 +3336,8 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" dependencies = [ + "cc", + "openssl-sys", "pkg-config", "vcpkg", ] @@ -3819,6 +3821,28 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "openssl-src" +version = "300.2.3+3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", +] + [[package]] name = "orbclient" version = "0.3.47" diff --git a/Cargo.toml b/Cargo.toml index 6858094..b4a4e16 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/harbor.sqlite b/harbor.sqlite deleted file mode 100644 index c978d5d..0000000 Binary files a/harbor.sqlite and /dev/null differ diff --git a/justfile b/justfile index f7b792a..3158950 100644 --- a/justfile +++ b/justfile @@ -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