Sharing: the default server is a build-time setting

FIGCRAFT_DEFAULT_SERVER, set when compiling, names another server or, set to nothing, ships a
build with no default: online sharing then stays off until the user enters a server in
Preferences. Normal builds and the release workflow are unchanged.
This commit is contained in:
bflatastic
2026-10-13 03:01:34 +07:00
committed by BFlat
parent 511213e820
commit 794b83a0db
5 changed files with 33 additions and 4 deletions
+16
View File
@@ -52,6 +52,22 @@ Windows and draft-release jobs declare `environment: release`; off the `release`
environment refuses them (0 steps) and no release is created. The `version` input is applied with
`xtask version set` before building, so the binaries report it too.
## The default server
Share ▸ Online uses the server in Preferences, which starts as the public one built into the app
(`figcraft_engine::live::DEFAULT_SERVER`). Distributions that would rather not ship that default
set `FIGCRAFT_DEFAULT_SERVER` when building: to their own server's address (`wss://host/`), or to
nothing for a build with no default, where online sharing stays off until the user enters a
server (sharing on the local network works either way):
```sh
FIGCRAFT_DEFAULT_SERVER= cargo build --release -p figcraft # no default server
FIGCRAFT_DEFAULT_SERVER=wss://design.example.org/ cargo build --release -p figcraft
```
The release workflow leaves it unset. The public server's terms are in
[`online-sharing-terms.md`](online-sharing-terms.md).
## What gets built
| Platform | Artifacts | Built on |
+2 -1
View File
@@ -728,7 +728,8 @@ sudo systemctl start figcraft-server
the server; on the server they are stored unencrypted, so the operator and anyone who can read
the data directory can read every file. Tell the people who publish to your server so (the
README's [Privacy and online sharing](../README.md#privacy-and-online-sharing) says it for the
default public server, whose terms are [online-sharing-terms.md](online-sharing-terms.md): a
default public server, which a build can replace or leave out with `FIGCRAFT_DEFAULT_SERVER`
([releasing](releasing.md#the-default-server)), and whose terms are [online-sharing-terms.md](online-sharing-terms.md): a
starting point for your own), and set `operator_contact` and `terms_url` on a public one.
- **Access** is a share link (128-bit random token) per file and access level, an owner token
(128-bit) per file published without the key, or the server key (128-bit) for managing files.