update README with build/run notes
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmEKJjQACgkQO3+8IhRO Y5iH6w/9GyoQnrrEzfUjaDnm1/Sl77D9wSlDinC1WV3QxnnR3KAt81qciLQ1BT+A 5YXF//m+iTOxlk7ZQBruoElcGXoxqot6p8cGOytMd4BmroUo52Wxl1aW4Y5kBxt0 Z8af0Sf7NUTBNhR3CuEClAl2PfZDt3esdENkuWFKcXRU6cHG5EXiHxsU4u/Wjj8y 1og33ACxa9IBg6hDexgCt5WQ8ul9iW5dOOJwCkP6nTFEulfSitvnWk8zrXTE0I/a OBq4tHC/5eNKLYVT0cQV4LlbfS9UW4AJL+ORFnnGVj+Pf1ZMiLBbmT0jf0sZYx9b DPXeauuthnkC/l7qxvO3NPdxdiCJH0yTIHEWs8txq4u51fNSZU6wIBDlzfxqZMbm NkG03N31xzwDf8LkUxCLNE/f/y/aflpYho65M3uzB7bTrZmx0J5kA0ehLFhULAPq 59rqG01uz+skuPPyT/avNUbLzhmB8AJBRjPYsJv8vYWAKV4ANuZpwZZlzWhDxqM7 CAwEj46d+Jpewy1W91gXPRPIjBU36hRZVm2JeKHStgjCkOlpEdFPkuDAT5pvCVXE 7SP9A5bph/XGRH6n8BdNrG7Yb4H9aZsbFuCm5IbvifPYFxpt1WNjW9u0eh6eqHGH IGZfEmNRyTHR9k6mZUGVs4/xEg4gdFGgD5ue4L6Ugzl7Ai62Z24= =Q/EP -----END PGP SIGNATURE-----
1 files changed,
28 insertions(+),
6 deletions(-)
jump to
M
README.md
→
README.md
@@ -39,6 +39,15 @@ * `/random`: Read-only, get a random number from 0 to 99.
* `/grandom`: Read-only, get a random number from 0 to 99 -- These are doled out on a per-realm basis, and the number stays the same until everyone in the realm has had a chance to read it. If you've already read it this round or aren't in a realm, it will be empty. +### realm format + +Each realm directory on the server should have the following files: + + * `realm`: Basic data for the realm, file should contain only the maximum number of members, the master's name, and the password hash, if any (otherwise 0), separated by spaces. + * `universe`: The actual game state for the realm as key value pairs, one per line, like `KEY = VALUE`; limit 15 characters for keys, 63 for values. + +The realm should be synchronized to disc when realm membership, limit, or password change. Fenagling some periodic autosave should be possible... + ## configuration `config.h` in the source contains the following configuration macros:@@ -46,11 +55,24 @@
* `MAX_USERS`: the maximum number of simultaneous users able to attach to the `xrxs` service * `DATA_DIR`: the path to the root of the cartridge and realm storage; can be absolute or relative to the `xrxs` executable, but must have the trailing `/` -## realm format +## build/run -Each realm directory on the server should have the following files: +`xrxs` is built/tested in a Linux environment with `plan9port` and the C standard library as the only dependencies. With minimal modifications it will probably run just as well on *BSD, WSL, and MacOS. - * `realm`: Basic data for the realm, file should contain only the maximum number of members, the master's name, and the password hash, if any (otherwise 0), separated by spaces. - * `universe`: The actual game state for the realm as key value pairs, one per line, like `KEY = VALUE`; limit 15 characters for keys, 63 for values. - -The realm should be synchronized to disc when realm membership, limit, or password change. Fenagling some periodic autosave should be possible...+Running `./build.sh` from the repository root should build the `xrxs` executable. + +You can run a local server (for testing, split-screen games, or single-player games) with: +``` +./xrxs -m /path/to/mountpoint +``` + +or expose a service on the network (uses `9pserve` to support multiple users and gracefully handle disconnects) with: +``` +./xrxs-srv.sh start +``` + +Similarly, you can stop the service with: +``` +./xrxs-srv.sh stop +``` +