diff --git a/README.md b/README.md index 8405875..67f5cdf 100644 --- a/README.md +++ b/README.md @@ -54,9 +54,11 @@ the MD5 over the whole stream least of all -- has anywhere to put the change. ## Using the library -The repository is at , and clones over -SSH from `ssh://git@git.ocjtech.us/jeff/zig-flac.git`. Fetch it with -`zig fetch --save` and import the module it exposes as `flac`: +Fetch it and import the module it exposes as `flac`: + +```console +$ zig fetch --save git+ssh://git@git.ocjtech.us/jeff/zig-flac.git +``` ```zig const flac = b.dependency("zig_flac", .{ .target = target, .optimize = optimize }); @@ -332,6 +334,53 @@ Three real defects came out of it, which is the argument for having it: now checked against the depth its subframe codes at, before the next one uses it, which is what keeps every multiplication inside 64 bits. +## Getting the source + +The repository has two homes, and they carry the same history. + +The everyday one is a Forgejo instance: + +```console +git clone ssh://git@git.ocjtech.us/jeff/zig-flac.git +``` + +It is also published on [Radicle](https://radicle.dev/), a peer-to-peer code +forge built on git, where a repository is found by its Repository ID (RID) +rather than by a server name: + +``` +rad:z3zwzMBNErfqXqj27E7aJFkuXL6HA +``` + +If you do not have Radicle yet, install it, create an identity, and start your +node: + +```console +curl -sSf https://radicle.dev/install | sh +rad auth +rad node start +``` + +Then clone the repository: + +```console +rad clone rad:z3zwzMBNErfqXqj27E7aJFkuXL6HA +``` + +`rad clone` consults your node's routing table to find seeds that carry the +repository, and drops the working copy into a `zig-flac` directory. Pass a +target path as a second argument to put it somewhere else. If your node has not +discovered a seed yet, name one directly with `--seed `. + +The result is an ordinary git working copy on the `main` branch, with a `rad` +remote wired up, so everyday work is just git. To pull in changes published +since your clone: + +```console +rad sync --fetch +git pull rad main +``` + ## Building Zig is not on `PATH`; everything runs through the flake's devshell.