|
2 weeks ago | |
---|---|---|
htmldocs | 2 weeks ago | |
protocols | ||
src | 2 weeks ago | |
test-vectors | ||
tests | 4 weeks ago | |
.envrc | 2 months ago | |
.gitignore | 2 months ago | |
README.md | 2 weeks ago | |
Tuprules.tup | 4 weeks ago | |
eris-link.xml | 2 months ago | |
eris-open.desktop | 2 months ago | |
eris.nimble | 2 weeks ago | |
eris48.png | 2 months ago | |
erisresolver.config.sample.pr | ||
nimdoc.cfg | ||
shell.nix |
README.md
ERIS
A collection of libraries and utilities for the Encoding for Robust Immutable Storage.
The latest version of this repository should be available at Codeberg.
Building
Debian
The Debian is too old and crusty to support.
The Nix way:
# https://nixos.org/download.html#download-nix
$ sh <(curl -L https://nixos.org/nix/install) --no-daemon
$ nix-env -iA nixpkgs.gitMinimal
$ nix-env -iA eriscmd -f https://codeberg.org/eris/nix-eris/archive/trunk.tar.gz
The Debian way:
- Install pkg-config
- Build and install the current Nim compiler and the Nimble utility from source.
- Build and install the tkrzw library from source.
- Build and install the getdns library from source.
- Run
nimble install https://codeberg.org/eris/nim-eris.git
. - Probably do some other stuff but you are Debian user so you should be able to manage on your own.
eriscmd
eriscmd
is a utility program with a bunch of subcommands. They are mostly self-describing.
link
The eriscmd link
utility creates ERIS link files.
This utility requires the location of an ERIS CoAP server which should be passed with the environmental variable ERIS_STORE_URL
.
A simple example:
test "$ERIS_STORE_URL = coap+tcp://[::1]:5683"
open
The eriscmd open
utility opens ERIS link files in an application that is locally configured for the given MIME type of the link file. To integrate it within a Freedesktop.org environment the eris-open.desktop, eris-link.xml, and eris48.png should be installed in their appropriate locations.
The utility only works as well as the associations that are configured for different MIME types, see the xdg-mime
utility from xdg-utils for more information.
The utility requires a configuration file that describes the location of the preferred HTTP decoder service. The file is called eris-open.ini
and must be located in the XDG_CONFIG_HOME
XDG_CONFIG_DIRS
hierarchy (~./config/
is good enough).
A simple example:
[Decoder]
URL=http://[::1]:80
resolver
The eriscmd resolver
utility that resolves ERIS blocks between the following:
- CoAP clients
- CoAP servers
- HTTP clients (see ERIS over HTTP)
- HTTP servers
- tkrzw database files
- Syndicate actors
The server configuration is inspired by Genode's dynamic component reconfiguration and implemented by the Syndicated actor model. The server cannot be excuted normally, it must be supervised by a Syndicate server. The configuration schema is at erisresolver_config.prs and sample is at erisresolver.config.sample.pr.
If you are using UNIX you will need to ask a system administrator or a grownup that you trust to remove the restriction on binding to port 80. This is can be done with sysctl
:
doas sysctl net.ipv4.ip_unprivileged_port_start=80
verify
The eriscmd verify
utility will fetch all blocks that constitute a read capability. It parses capabilities on the command-line in URN form and otherwise parses CBOR on standard input to find capabilities.
eriscmd verify urn:eris:BIAMSY42PLVLXF2GQAVOONCNWPEU2PLOYXZXAVFZIRVACKI424N24CMJPPRK7QNWH3LNRE7Q3ENOAJWPKCNUJOLCHIWSEOO6RW5KH7MJ2A
cat *.eris | eriscmd verify
Helpers
rclerislink
The rclerislink
utility is a document input handler for the Recoll indexer that allows ERIS link file content to be dereferenced and indexed.
This input handler needs to be registered in the ~/.recoll/mimeconf
file so that it is invoked for the application/x-eris-link+cbor
file MIME type. For detection of this MIME type to work the eris-link.xml file should be installed in a location where it is discoverable by xdg-mime query filetype …
.
[index]
application/x-eris-link+cbor = execm /some/path/to/rclerislink
Nix development
nix develop git+https://codeberg.org/eris/nix-eris#nim-eris
The drafting of the ERIS specification and this implementation was funded by the NGI Assure Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program.