From 7436e4ff651b64d4019a59d04c30c414ae220403 Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Fri, 22 Apr 2022 21:14:23 +0100 Subject: feature-flags (#328) * use feature flags * fmt * fix features * update ci * fmt Co-authored-by: Ellie Huxtable --- Cargo.toml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 5eb3d2cb..0b1bda03 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,9 +29,17 @@ atuin = { path = "/usr/bin/atuin" } [workspace] members = ["./atuin-client", "./atuin-server", "./atuin-common"] +[features] +# TODO(conradludgate) +# Currently, this keeps the same default built behaviour for v0.8 +# We should rethink this by the time we hit a new breaking change +default = ["sync", "server"] +sync = ["atuin-client/sync"] +server = ["atuin-server", "tracing-subscriber"] + [dependencies] -atuin-server = { path = "atuin-server", version = "0.8.1" } -atuin-client = { path = "atuin-client", version = "0.8.1" } +atuin-server = { path = "atuin-server", version = "0.8.1", optional = true } +atuin-client = { path = "atuin-client", version = "0.8.1", default-features = false } atuin-common = { path = "atuin-common", version = "0.8.1" } log = "0.4" @@ -59,7 +67,6 @@ clap_complete = "3.1.2" fs-err = "2.7" whoami = "1.1.2" - [dependencies.tracing-subscriber] version = "0.3" default-features = false @@ -69,8 +76,4 @@ features = [ "registry", "env-filter", ] - -[profile.release] -lto = "fat" -codegen-units = 1 -opt-level = 3 +optional = true -- cgit v1.3.1