Jiahao XU
c36f1fe08a
Add dep guess_host_triple v0.1.3 for windows
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-23 13:43:13 +10:00
Félix Saparelli
a747edffd5
Merge pull request #183 from ryankurte/dependabot/cargo/semver-1.0.10
2022-06-23 10:36:13 +12:00
Félix Saparelli
a90d1328ea
Merge pull request #190 from ryankurte/dependabot/cargo/clap-3.2.6
2022-06-23 07:11:56 +12:00
dependabot[bot]
ba114fceae
Bump semver from 1.0.9 to 1.0.10
...
Bumps [semver](https://github.com/dtolnay/semver ) from 1.0.9 to 1.0.10.
- [Release notes](https://github.com/dtolnay/semver/releases )
- [Commits](https://github.com/dtolnay/semver/compare/1.0.9...1.0.10 )
---
updated-dependencies:
- dependency-name: semver
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-22 18:46:13 +00:00
dependabot[bot]
d8ad005800
Bump clap from 3.1.18 to 3.2.6
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.1.18 to 3.2.6.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.18...v3.2.6 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-22 18:42:49 +00:00
Félix Saparelli
43511690f4
Add tbz2 to readme
2022-06-23 06:37:43 +12:00
Félix Saparelli
0998439312
Merge pull request #181 from qryxip/add-pkgfmt-tbz2
2022-06-23 06:37:02 +12:00
Félix Saparelli
ae9e0bdd77
Merge branch 'main' into add-pkgfmt-tbz2
2022-06-23 06:36:43 +12:00
Félix Saparelli
7baadebba3
Merge pull request #182 from ryankurte/dependabot/cargo/strum-0.24.1
2022-06-23 06:35:03 +12:00
Félix Saparelli
c042ccfaa5
Merge pull request #187 from ryankurte/dependabot/cargo/reqwest-0.11.11
...
Bump reqwest from 0.11.10 to 0.11.11
2022-06-23 06:20:21 +12:00
Félix Saparelli
ad091f7976
Merge pull request #188 from NobodyXu/remove-unused-dep
...
Rm unused dep `cargo_metadata`
2022-06-23 06:15:46 +12:00
Ryo Yamashita
27c0a379d4
Enable bzip2/static
...
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-23 02:38:04 +09:00
Ryo Yamashita
1b9f8c0ffc
Add PkgFmt::Tbz2
2022-06-23 02:37:55 +09:00
Jiahao XU
127d7045d5
Rm unused dep cargo_metadata
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-22 15:12:01 +10:00
Félix Saparelli
3b5ea35182
Merge pull request #180 from NobodyXu/refactor-and-optimize/AsyncExtracter
2022-06-22 15:25:39 +12:00
Jiahao XU
2f38925ee4
Refactor From<io::Error> for BinstallError
...
Avoid one `expect`.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-21 14:10:27 +10:00
Jiahao XU
c5a2a89361
Rm the duplicate debug!
in main.rs:214
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-21 13:52:27 +10:00
Jiahao XU
74a6e137be
Refactor: Mv debug!
into create_request
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-21 13:47:00 +10:00
Jiahao XU
ad41756daa
Rename fmt.rs
to format.rs
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-21 13:45:56 +10:00
Jiahao XU
23bad39ba8
Refactor:Mv mod visitor
vfs
under crates_io
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-21 13:44:12 +10:00
Jiahao XU
b6f15f2e5e
Refactor: Extract fetch_crate_cratesio
out into mod
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-21 13:42:39 +10:00
Jiahao XU
c916814e7e
Refactor: Extract find_version
into mod
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-21 13:40:36 +10:00
Jiahao XU
5d79af545b
Add doc for Vfs
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-21 13:38:24 +10:00
dependabot[bot]
1c9ec8d25c
Bump reqwest from 0.11.10 to 0.11.11
...
Bumps [reqwest](https://github.com/seanmonstar/reqwest ) from 0.11.10 to 0.11.11.
- [Release notes](https://github.com/seanmonstar/reqwest/releases )
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.10...v0.11.11 )
---
updated-dependencies:
- dependency-name: reqwest
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 01:25:13 +00:00
Jiahao XU
784a24577b
Refactor: Rm extract_impl
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 18:37:50 +10:00
Jiahao XU
db22d7d041
Fix codestyle in async_extracter
...
Use consistent codestyle for specifing trait bounds.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 18:35:01 +10:00
Jiahao XU
53bf76104b
Revert refactor: Put fetch_crate_cratesio
back to drivers
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 18:27:08 +10:00
Jiahao XU
b14b71135e
Revert refactor: Put find_version
back to drivers
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 18:25:50 +10:00
Jiahao XU
a5879e3d65
Rm unnecessary to_owned
call in extract_*
...
It was called before because `spawn_blocking` requires that, but we now
switches to `block_in_place` which no longer needs this.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 18:24:01 +10:00
Jiahao XU
9de8a4841f
Update doc of mod async_extracter
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 18:12:48 +10:00
Jiahao XU
b152358175
Rm unused trait bound in extract_impl
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 18:12:13 +10:00
Jiahao XU
621a641529
Rm unused items in mod helpers
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 18:10:22 +10:00
Jiahao XU
c15d99c6f0
Run downloader & extracter on the same thread
...
This have the following advantage:
- Remove the mpsc channel, which:
- Remove synchronization required for mpsc.
- Remove the internal buffering of the mpsc channel, which avoid potentially OOM situation.
- Improve data locality since it no longer needs to be sent over thread.
- It uses `block_in_place` to avoid creating an additional blocking
thread.
The disadvantages would be that the downloader can no longer be run in parallel to the extracter.
If the bottleneck is the decompressor, then the downloader should also pause and wait
for the decompressor to consume the data.
But if the bottleneck is the network, then that might be an issue.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 18:07:46 +10:00
Jiahao XU
aba1ba7b6d
Manually impl From<io::Error> for BinstallError
...
so that if the `io::Error` wraps a `BinstallError`, we would just unwrap
it and return the inner `BinstallError`.
Otherwise, just wrap the `io::Error` in a `BinstallError`.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 18:05:15 +10:00
Jiahao XU
1161a60968
Simplify create_tar_decoder
: Ret io::Result
...
instead of `Result<Archive, BinstallError>`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 17:56:17 +10:00
Jiahao XU
0480e99460
Impl newtype StreamReadable
...
It wraps a `Stream<Item = Result<Bytes, E>>` and implements `Read` and
`BufRead` on it so that it can be used on sync context.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-18 17:29:50 +10:00
Jiahao XU
39ab334da5
Add a simple optimization to normalize_path
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-15 17:52:49 +10:00
Jiahao XU
30b9a78520
Optimize normalize_path
: Avoid copy if possible
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-15 17:45:50 +10:00
Jiahao XU
282805c3ac
Add reference to the src of path_ext
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-15 17:23:00 +10:00
Jiahao XU
9eb1128f9f
Rm unused DummyVisitor
in extract_tar_based_stream
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-13 19:32:55 +10:00
dependabot[bot]
6578b67225
Bump strum from 0.24.0 to 0.24.1
...
Bumps [strum](https://github.com/Peternator7/strum ) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/Peternator7/strum/releases )
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Peternator7/strum/commits )
---
updated-dependencies:
- dependency-name: strum
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 01:29:47 +00:00
Jiahao XU
2091345ce0
Refactor: Mv TarEntriesVisitor
to mod async_extracter
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-13 01:14:22 +10:00
Jiahao XU
467f7f6834
Refactor: Call create_tar_decoder
directly
...
in `extract_tar_based_stream*`.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-13 01:12:21 +10:00
Jiahao XU
9584c8d35e
Refactor: Extract create_tar_decoder
...
from `extract_compressed_from_readable`.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-13 01:06:12 +10:00
Jiahao XU
8ef1e56fcc
Take Receiver
by value in ReadableRx::new
...
It would remove the lifetime and make reasoning the code much easier.
It would also unblock the next commit I am going to make.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-13 01:05:07 +10:00
Jiahao XU
b4e61161f2
Derive strum_macros::Display
on TarBasedFmt
...
sp that it can be printed.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-13 00:53:08 +10:00
Jiahao XU
c9b0c0c59c
Add .DS_Store
to .gitignore
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-12 22:38:34 +10:00
Jiahao XU
94c77c32b4
Make debug!
message more consistent
...
in `extract_compressed_from_readable`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-12 22:38:00 +10:00
Jiahao XU
225cf74cd9
Refactor: Ret impl Stream
in create_request
...
Since both `download*` function takes a `impl Stream` and the
`Response::bytes_stream` takes `Response` by value, thus there is no
lifetime issue and we can return `impl Stream` instead of `Response`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-12 20:01:43 +10:00
Jiahao XU
baf9784b82
Update doc of mod async_extracter
...
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-12 19:52:03 +10:00