diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42b6afc..4b286b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,9 @@ jobs: sqlx migrate run --source ./migrations - name: Build Project - run: cargo build + run: | + rustup target add x86_64-unknown-linux-gnu + cargo build --target x86_64-unknown-linux-gnu - name: Run Tests run: cargo test diff --git a/Cargo.toml b/Cargo.toml index cd27a70..4b867ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,18 +9,31 @@ build = "build/build.rs" axum = { version = "0.8.4", features = ["macros"] } dotenv = "0.15" serde = { version = "1.0.219", features = ["derive"] } -sqlx = { version= "0.8.5", features=["sqlite"] } +sqlx = { version= "0.8.5", features=["sqlite", "runtime-tokio-native-tls", "macros"] } state = "0.6.0" tera = { version = "1.20", default-features = false} -tera-hot-reload = { version = "0.2.4" } +tera-hot-reload = "0.2.4" tokio = { version = "1.45.0", features = ["full"] } tower-http = { version = "0.6.4", features = ["full"] } tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } tracing = "0.1.40" thiserror = "2.0.12" -url = "^2.5.4" -sqlx-cli = "0.8.5" +url = "2.5.4" +sqlx-cli = { version = "0.8.5", optional = true } rust-fuzzy-search = "0.1.1" lazy_static = "1.5.0" mockall = "0.13.1" auto-launch = "0.5.0" + +[build-dependencies] +cc = "1.0" + +[features] +default = [] +sqlite-bundled = [] + +[profile.release] +lto = true +strip = true +opt-level = "z" +codegen-units = 1 \ No newline at end of file diff --git a/Makefile b/Makefile index 8458e1f..663072a 100644 --- a/Makefile +++ b/Makefile @@ -32,8 +32,6 @@ build-windows: echo "✅ Done!" -build-mac: - sudo apt install -y libzstd-dev pkg-config build-essential - - cargo build --release --target x86_64-apple-darwin - # cargo build --release --target x86_64-unknown-linux-gnu +build-linux: + rustup target add x86_64-unknown-linux-gnu + cargo build --release --target x86_64-unknown-linux-gnu