fix: Fix embed feature flag and document in README

This commit is contained in:
selfhoster selfhoster 2026-09-22 14:54:53 +02:00
commit 7b5b66f891
2 changed files with 12 additions and 2 deletions

View file

@ -37,7 +37,7 @@ style = "deny"
[features]
default = [ "http", "noembed" ]
# Embed assets and templates in binary
embed = [ "dep:minijinja-embed", "dep:static-serve" ]
embed = [ "dep:minijinja-embed", "dep:static-serve", "tokio/fs" ]
# Don't embed assets and templates in binary
noembed = [ "dep:tower-http" ]
http = ["dep:axum", "dep:axum-extra", "dep:http", "dep:minijinja"]

View file

@ -10,6 +10,16 @@ for a solution which supports [virtualhosts](https://github.com/lldap/lldap/issu
> [!WARNING]
> This is not production-ready yet.
## Building
By default, building the binary expects to have the `assets` and `templates` folder in the same folder as the binary, as is useful during development. If you'd like to build a portable binary that embeds the assets and templates, you need to add the `embed` feature flag, for which you need to disable the default `noembed` feature:
```shell
cargo build --release --features embed,http --no-default-features
# My binary now contains everything and can be copied to a remote server
scp target/release/llldap ..........
```
## Comparison to lldap
Compared to lldap, llldap:
@ -45,7 +55,7 @@ We may explore in the future:
- Shamir's secret sharing social account recovery
- Permission to create invites on an account
- i18n domains (punycode)
- i18n user identifiers (TODO: check compatibility with other tools)
- i18n user identifiers (TODO: check compatibility with other tools) see [this IETF draft](https://datatracker.ietf.org/doc/html/draft-ietf-mailmaint-interoperable-addresses)
- RTL languages
- hierarchical groups
- fine-grained permissions (RBAC)