Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/app/src/cmd_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ pub async fn run(args: InitArgs) -> anyhow::Result<u8> {
{
anyhow::bail!(
"this binary is built with the '{backend}' backend; \
--backend {requested} requires the extenddb-{requested} binary"
--backend {requested} requires rebuilding with \
`cargo build --release --no-default-features --features {requested}`"
);
}
if args.backend.is_none() && Path::new(&args.config).exists() {
Expand Down
13 changes: 12 additions & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ cargo build --release
# MongoDB backend
# (backends are mutually exclusive; disable the default postgres feature)
cargo build --release --no-default-features --features mongodb

# SQLite backend (developer mode, see "SQLite backend (developer mode)" below)
cargo build --release --no-default-features --features sqlite
```

Each build produces a single-backend binary. The `postgres`, `mongodb`, and
Expand Down Expand Up @@ -128,7 +131,15 @@ This generates a certificate with SANs: `localhost`, `127.0.0.1`, and `10.0.1.5`
### SQLite backend (developer mode)

For local development and CI, extenddb can run against a SQLite backend instead
of PostgreSQL. Select it at init time with `--backend sqlite`:
of PostgreSQL. It requires its own build (the `postgres`, `mongodb`, and
`sqlite` backends are mutually exclusive, each compiled into a single-backend
binary — see [Build extenddb](#1-build-extenddb) above):

```bash
cargo build --release --no-default-features --features sqlite
```

Then select it at init time with `--backend sqlite`:

```bash
./target/release/extenddb init --backend sqlite
Expand Down
Loading