Ruediger Klaehn
6d66fc5865
feature: ensure we are not being lied to about total_blobs_size
...
If e.g. somebody sets total_blobs_size to 1000 but then sends us a huge
collection, before it would download it all. Now it will fail as soon as
total_blobs_size is exceeded.
2023-02-02 20:02:10 +02:00
Rüdiger Klaehn
6658d8836a
Merge pull request #99 from n0-computer/provide-sizes
...
Enforce size limit when transferring blobs
2023-02-02 19:56:27 +02:00
Friedel Ziegelmayer
3a15ebaf52
Merge pull request #103 from n0-computer/happy-arqu
...
fix(main): remove stderr tty check
2023-02-02 18:35:15 +01:00
Kasey
9b2ad046e9
feat: pass in custom names for blobs using DataSource::NamedFile ( #97 )
2023-02-02 12:25:47 -05:00
dignifiedquire
588dbe778b
fix(main): remove stderr tty check
2023-02-02 14:54:15 +01:00
Rüdiger Klaehn
6dace45e52
Merge pull request #101 from n0-computer/enforce-debug-instances
...
Enforce debug instances
2023-02-02 12:17:59 +02:00
Asmir Avdicevic
43a6ed505f
fix: ensure CI runs on main ( #100 )
2023-02-02 11:09:41 +01:00
Ruediger Klaehn
b0cdec109d
refactor: add debug instances for public types
...
also change build to produce warnings if there are no debug instances on
public types.
2023-02-02 12:06:40 +02:00
Ruediger Klaehn
cb6651eaf9
feature: use read_size() to enforce that we don't download oversized files
2023-02-02 10:51:34 +02:00
Ruediger Klaehn
bcc66f9309
feat: add method read_size
2023-02-02 10:45:36 +02:00
Friedel Ziegelmayer
e7ce384d1c
feat(provider): add events ( #87 )
...
Closes #80
2023-02-01 20:22:28 +01:00
Floris Bruynooghe
f60ce6ff8d
ref: Take the collection hash from the db creation ( #93 )
...
The database now returns the hash of the collection created. There's
no need to go manually looking for this anymore, just use it.
2023-02-01 17:59:54 +01:00
Rüdiger Klaehn
9e612c9058
Merge pull request #89 from n0-computer/remove-double-sizes-2
...
Remove double sizes - second attempt
2023-02-01 16:42:04 +02:00
Ruediger Klaehn
38437eb9c9
pr review: rename from_bytes and add comment about SliceDecoder range
2023-02-01 16:31:28 +02:00
Ruediger Klaehn
7faf4bfd7a
refactor: remove size from FoundCollection as well
2023-02-01 09:36:33 +02:00
Ruediger Klaehn
bd9d860775
refactor: remove size from found
...
The only thing we need to do is to tell the slice decoder to read until infinity.
It will grab the size and read the right amount.
2023-02-01 09:28:15 +02:00
Ruediger Klaehn
14d85549c5
test: add test to make sure that
...
- the slice decoder can handle offsets > len
- it reads exactly the encoded data and nothing else
2023-02-01 09:19:42 +02:00
Friedel Ziegelmayer
93107e37e8
fix(bin): ensure progressbar works for stdout ( #81 )
...
also redirects logs to STDERR
2023-01-31 15:47:30 +01:00
Rüdiger Klaehn
4d3d9d316f
Merge pull request #70 from n0-computer/async-slice-decode-2
...
Change data encoding from outboard then data to bao slice encoding
2023-01-31 12:12:51 +02:00
Ruediger Klaehn
6617d39868
refactor: named closures for the 3 callbacks
...
also remove comment that is no longer relevant
2023-01-31 11:57:01 +02:00
Ruediger Klaehn
da7c1566f2
pr review: preallocate buffers in a few places
2023-01-31 11:28:46 +02:00
dignifiedquire
aa2ffb163c
cleanup
2023-01-31 11:28:46 +02:00
dignifiedquire
ea94e98251
refactor: switch to callbacks instead of events
...
This allows avoiding the double copy when receiving data.
2023-01-31 11:28:45 +02:00
Ruediger Klaehn
80b9cff77b
feature: step 4 make use of the AsyncSliceDecoder
...
to avoid having to load everything into memory,
or to use two SyncIoBridges
2023-01-31 11:27:21 +02:00
Ruediger Klaehn
ff39ef2caf
feature: step 3 actually add AsyncSliceDecoder and friends
2023-01-31 11:27:21 +02:00
Ruediger Klaehn
4d3b384d8c
feature: step 2 - use SyncIoBridge when writing
...
this makes writing incremental, and we no longer load the entire file into
memory when writing. So we can serve files > mem size.
2023-01-31 11:27:21 +02:00
Ruediger Klaehn
c5be9f5d55
feature: step 1 - change from outboard+data to encoded
...
so far without any incremental writing. everything still happens in memory
2023-01-31 11:27:21 +02:00
Ruediger Klaehn
08ad6db112
feature: add bao slice decoder
...
from https://github.com/rklaehn/bao-experiment/blob/slice-decoder-2/src/lib.rs
2023-01-31 11:27:21 +02:00
Floris Bruynooghe
eb07ca917d
feat: Looser dependencies as it is a library
...
This loosens quite a few dependencies which makes it easier to use
sendme as a library. Some of these are required to be compatbible to
deltachat's Cargo.lock file which is otherwise suitable. Though some
of these are a bit more gratuitious loosening of deps.
2023-01-31 09:21:43 +01:00
Floris Bruynooghe
a846ea2652
feat: Looser dependencies as it is a library
...
This loosens quite a few dependencies which makes it easier to use
sendme as a library. Some of these are required to be compatbible to
deltachat's Cargo.lock file which is otherwise suitable. Though some
of these are a bit more gratuitious loosening of deps.
2023-01-30 12:37:29 +01:00
Floris Bruynooghe
2894143f30
feat(ci): Add MSRV check
...
This adds a basic MSRV check. The chosen MSRV copies the one used by
deltachat at the moment.
2023-01-30 11:17:22 +01:00
Floris Bruynooghe
f8547b7c61
use the context
2023-01-30 10:57:07 +01:00
Floris Bruynooghe
b335c418b8
fix
2023-01-30 10:44:29 +01:00
Floris Bruynooghe
2a6226376d
feat(ci): Add MSRV check
...
This adds a basic MSRV check. The chosen MSRV copies the one used by
deltachat at the moment.
2023-01-30 10:35:21 +01:00
Kasey
53ab7196a5
Fix: duplicate serde_hash implementation & some spelling errors ( #72 )
2023-01-28 08:07:00 -05:00
Friedel Ziegelmayer
35cb4bd28a
feat: remove varints ( #71 )
...
and use `take` to have cleaner protocol reads
2023-01-27 14:19:11 +01:00
Floris Bruynooghe
aa269ab315
feat: Provide a single ticket to fetch a hash
...
This adds a ticket format which enables fetching a hash using a single "ticket" which contains all the connection details. With an IPv4 address this just over 200 bytes long.
2023-01-27 13:42:26 +01:00
Friedel Ziegelmayer
733e53369e
feat(cli): improve the output of collections ( #69 )
...
* feat(cli): improve the output of collections
* clippy
2023-01-27 13:01:09 +01:00
Floris Bruynooghe
f70f3efd12
doc comment
2023-01-27 12:52:19 +01:00
Floris Bruynooghe
8b5f71276e
cosmetics
2023-01-27 12:49:36 +01:00
Floris Bruynooghe
8ce99341ca
missed ui improvements from merge
2023-01-27 12:46:20 +01:00
Floris Bruynooghe
4ef108e15a
Merge branch 'main' into flub/ticket
2023-01-27 12:43:01 +01:00
Floris Bruynooghe
71d8cce5dc
Create get-tocket subcommand
2023-01-27 12:39:35 +01:00
Rüdiger Klaehn
bf86837b79
feature: incrementally compute outboard
...
* feature: incrementally compute outboard
...instead of loading the whole thing into memory. This means that we can
work with files that are larger than available memory.
* review:
- use imported anyhow::ensure instead of using prefix
- use BufReader
- change one ensure to debug_assert
2023-01-27 12:02:51 +01:00
Friedel Ziegelmayer
5c48f5eec3
refactor: use genawaiter instead of async-stream
2023-01-27 12:02:18 +01:00
Floris Bruynooghe
bf087b63a5
feat: Create a Builder for the Provider
...
This is a nicer API to create a builder. Crucially it can give all
the information to connect to a provider once it is started.
Something that wasn't quite possible before.
2023-01-27 11:49:49 +01:00
Floris Bruynooghe
7c3a7006fd
Merge branch 'flub/provider-builder' into flub/ticket
2023-01-27 11:49:11 +01:00
Asmir Avdicevic
4befae261d
fix: windows multi_client tests ( #66 )
...
* test single thread
* multi thread single client
* maybe tasks?
* bind test
* maybe?
* cleanup
2023-01-27 11:39:15 +01:00
Friedel Ziegelmayer
57dd758791
feat: improve CLI
...
- add either a folder or a file
- print current receiving above the progressbar
2023-01-27 11:33:56 +01:00
Floris Bruynooghe
67e3828ab0
fixup
2023-01-27 11:26:00 +01:00