Rüdiger Klaehn ada047aa06 Allow nested directories while still keeping the flat collection / blob hierarchy (#845)
* feat(persistence): copy over directory functions from beetle

* feat: add snapshot type that deals with persistence

* test(persistence): add property based tests for db persistence

* feat(persistence): basic persistence works

* Make provider cloneable

* refactor:

provider is getting to big, so give it its own submodule and put database
in there.

* clippy

* fix: disable persistence in cli tests

* refactor: make the snapshot stuff just pub(crate)

so we don't bloat the public API

* fix: properly handle when iroh data dir does not exist yet

Also fix mixup of dir names

* fix: persist key in iroh data root if persistence is on

* feat: canonicalize before adding collection

Not saying that we should suddenly start to care about canonicalization, but
it is almost free, so we might as well do it.

* feat: allow deep directory structures

* fix: make sure deep directories are created

* refactor: use walkdir

* pr: remove unused dev dependency and dead code annotation

* test: add basic test for persistence

* pr: remove key and persist options

it will now always persist.

Also fix the test by not mixing sync and async.

* refactor: get rid of collection name

The name should be external

* refactor: make fields in Collection private

...so we can canonicalize it

* ci: change toolchain for doc to stable

* refactor: canonicalize collection on create

conceptually, a collection should be a set of name -> blob mappings that
is sorted by name. We could use a BTreeMap or a RadixTree later.

* fix: special handling for single files

* doc: add comment about traversal

* feat: properly handle windows insanity

* Add basic test for canonicalize_path

* test: add a test that sends a (tiny) hierarchy

* refactor: runtime check for duplicate names

* pr review: minor changes and comments
2023-03-22 12:14:59 +02:00
2023-01-09 17:37:25 +01:00
2023-02-22 15:24:34 +01:00
2023-03-09 17:59:51 +01:00
2023-01-18 11:18:04 +01:00
2023-01-18 11:18:04 +01:00
2023-02-24 11:00:33 +01:00

iroh

IPFS reimagined.


Usage

Cli

Sending data

$ ./iroh provide <file>

Receiving data

$ ./iroh get <hash>

As a library

Disable default features when using iroh as a library: iroh = { version: "...", default-features = false }

This removes dependencies that are only relevant when using iroh as a cli.

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

S
Description
IP addresses break, dial keys instead. A library that adds QUIC + NAT Traversal to your apps.
Readme
435 MiB
Languages
Rust 99.6%
Shell 0.3%