feat: Add embed and noembed feature flags for HTTP assets/templates
This commit is contained in:
parent
dba07912d2
commit
1bbdb04dc9
5 changed files with 88 additions and 9 deletions
13
Cargo.toml
13
Cargo.toml
|
|
@ -13,11 +13,13 @@ futures-util = { version = "0.3.34", features = ["sink"] }
|
|||
http = { version = "1.5.0", optional = true }
|
||||
ldap3_proto = "0.8.1"
|
||||
minijinja = { version = "2.24.0", optional = true }
|
||||
minijinja-embed = { version = "2.24.0", optional = true }
|
||||
serde = { version = "1.0.229", features = ["derive"] }
|
||||
static-serve = { version = "0.6.3", optional = true }
|
||||
tokio = { version = "1.53.1", features = ["macros", "net", "rt", "time", "sync"] }
|
||||
tokio-util = { version = "0.7.19", features = ["codec"] }
|
||||
tower = "0.5.3"
|
||||
tower-http = { version = "0.7.1", features = ["fs"], optional = true }
|
||||
tracing = "0.1.44"
|
||||
tracing-subscriber = "0.3.23"
|
||||
uuid = { version = "1.26.0", features = ["v4"] }
|
||||
|
|
@ -30,5 +32,12 @@ perf = "deny"
|
|||
style = "deny"
|
||||
|
||||
[features]
|
||||
default = [ "http" ]
|
||||
http = ["dep:axum", "dep:axum-extra", "dep:http", "dep:minijinja", "dep:static-serve"]
|
||||
default = [ "http", "noembed" ]
|
||||
# Embed assets and templates in binary
|
||||
embed = [ "dep:minijinja-embed", "dep:static-serve" ]
|
||||
# Don't embed assets and templates in binary
|
||||
noembed = [ "dep:tower-http" ]
|
||||
http = ["dep:axum", "dep:axum-extra", "dep:http", "dep:minijinja"]
|
||||
|
||||
[build-dependencies]
|
||||
minijinja-embed = { version = "2.24.0", optional = true }
|
||||
|
|
|
|||
Loading…
Reference in a new issue