wala-rust

Unnamed repository; edit this file 'description' to name the repository.
Info | Log | Files | Refs | README | LICENSE

commit 5642f100cb40e011b4805229773df0d3153691a9
parent efa3f6a09919a257b73d81020e1f9365714178b9
Author: lash <dev@holbrook.no>
Date:   Sun, 17 Jul 2022 07:18:07 +0000

Add top-level docs decscription

Diffstat:
Msrc/main.rs | 30++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+), 0 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -1,3 +1,33 @@ +#![crate_name = "wala"] + +//! wala is a content-adressed HTTP server. +//! When content is uploaded, the URL to the content is automatcally generated from the contents of the request body. The URL will always be the same for the same content. +//! These will be referred to as _immutable references_. +//! +//! The content of the URL is the SHA256 hash of the content, in hex, lowercase, without a 0x +//! prefix. +//! +//! The wala daemon will listen to all ip addresses on port 8000 by default, aswell as store and +//! serve uploaded files from the current directory. This behavior can be modified by the argument +//! options. See `cargo run -- --help` for details. +//! +//! Content is stored by making `PUT` requests to the server. With a server running on +//! `localhost:8000`a `PUT` with the content body `foo` can in turn be retrieved at: +//! +//! ``` +//! http://localhost:8000/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae +//! ``` +//! If built with the `meta` feature, the content type specified in the `PUT` will be stored and used +//! when the file is retrieved. `wala` will _not_ double-check the content type against the actual +//! content. +//! +//! wala also provides a way to generate URL aliases to content based on cryptographic identities. +//! These will be referred to as _mutable references_. +//! This is accomplished using a custom `PUBSIG` scheme for the `Authorization` header, specifying +//! the cryptographic engine to use, the public key and the signature of the content. See the +//! [wala::auth](crate::auth) module for more details. +//! + use tiny_http::{ Server, ServerConfig,