From 7b5b66f891a55bddca0c1a5236d4d97dfdce75d3 Mon Sep 17 00:00:00 2001 From: selfhoster1312 Date: Tue, 22 Sep 2026 14:54:53 +0200 Subject: [PATCH] fix: Fix `embed` feature flag and document in README --- Cargo.toml | 2 +- README.md | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 827b2dd..d717df0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] diff --git a/README.md b/README.md index a37bd15..01c47ce 100644 --- a/README.md +++ b/README.md @@ -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)