Commit Graph

210 Commits

Author SHA1 Message Date
Kat Marchán 364f9da65e
feat(deps): bump miette and thiserror 2023-03-31 17:35:19 -07:00
Kat Marchán 646ae52e2f
chore: Release cacache version 11.4.0 2023-03-09 18:26:16 -08:00
Kat Marchán 190252326c
docs: update changelog 2023-03-09 18:26:07 -08:00
Kat Marchán b88217cc54
feat(link): implement hard_link_hash_sync too 2023-03-09 18:25:26 -08:00
Johannes Becker 02d7f146f1
fix(security): bump tempfile version to 3.4.0 (#45) 2023-03-07 10:21:02 -08:00
Kat Marchán 262e1ca2ba
chore: Release cacache version 11.3.0 2023-03-04 17:24:30 -08:00
Kat Marchán 91b4111186
docs: update changelog 2023-03-04 17:21:46 -08:00
Kat Marchán 89eee6c1ae
feat(links): add support for hard linking from the cache (#43) 2023-03-04 17:10:46 -08:00
Kat Marchán 80e5b4135b
chore: Release cacache version 11.2.0 2023-02-27 19:10:50 -08:00
Kat Marchán 50899fa754
docs: update changelog 2023-02-27 19:10:12 -08:00
Kat Marchán d39e83801d
feat(copy): add support for reflink-copy and unsafe-copy (#42) 2023-02-27 19:09:02 -08:00
Scott Haug ac56fd9ce6
feat(link_to): Add support for linking to existing files from the cache (#41) 2023-02-27 14:08:01 -08:00
Kat Marchán 4d85f3ca84
(cargo-release) start next development iteration 11.1.1-alpha.0 2023-02-19 01:24:04 -08:00
Kat Marchán 13809bc1b9
(cargo-release) version 11.1.0 2023-02-19 01:23:33 -08:00
Kat Marchán be43d3fc88
docs: update changelog 2023-02-19 01:23:22 -08:00
Kat Marchán 9991f56b4c
feat(index): Add support for raw index metadata and expose index functions 2023-02-19 01:18:29 -08:00
Kat Marchán 70b3d5e695
(cargo-release) start next development iteration 11.0.3-alpha.0 2023-02-18 21:39:53 -08:00
Kat Marchán 61aec9e61c
(cargo-release) version 11.0.2 2023-02-18 21:39:20 -08:00
Kat Marchán abd067496d
docs: update changelog 2023-02-18 21:38:44 -08:00
Redmar Kerkhoff 53c289523f
fix(ls): make sure `ls` sees entry deletions (#40) 2023-02-18 21:36:44 -08:00
Kat Marchán 067d082690
(cargo-release) start next development iteration 11.0.2-alpha.0 2023-02-18 21:35:40 -08:00
Kat Marchán 1ffa7fc3d2
(cargo-release) version 11.0.1 2023-02-18 21:35:07 -08:00
Kat Marchán 7f518204d3
docs: update changelog 2023-02-18 21:33:35 -08:00
Kat Marchán f8cbfefc12
feat(deps): bump ssri to 8.0.0 2023-02-18 21:31:00 -08:00
Kat Marchán 856c059096
(cargo-release) start next development iteration 11.0.1-alpha.0 2023-01-28 19:29:33 -08:00
Kat Marchán c86cd4c950
(cargo-release) version 11.0.0 2023-01-28 19:27:42 -08:00
Kat Marchán 68d15f994c
docs: update changelog 2023-01-28 19:27:31 -08:00
Kat Marchán 97625bb77c
ci: glob together async-std and tokio in CI again 2023-01-28 19:20:09 -08:00
Kat Marchán c2d5390a84
feat(errors): integrate miette and generally improve error reporting (#38)
BREAKING CHANGE: This bumps the MSRV to 1.67.0 and documents it in the README.
2023-01-28 19:17:53 -08:00
Kat Marchán da259ae432
fix(perf): do the inner fn trick to reduce generic compilation load 2023-01-28 16:49:31 -08:00
Kat Marchán 2767a6a671
misc: clippy fixes 2023-01-28 15:55:01 -08:00
Kat Marchán dca57e1100
fix(msrv): be less aggressive about MSRV bump 2023-01-28 15:55:00 -08:00
Kat Marchán 7104df66dd
misc: update warning name 2023-01-28 15:55:00 -08:00
Kat Marchán 7afcb8d649
tests: stop spawning a new tokio runtime every benchmark iteration 2023-01-28 15:55:00 -08:00
Kat Marchán 526386ada8
fix(deps): only include rt-multi-threaded for tokio when running tests 2023-01-28 15:55:00 -08:00
Kat Marchán 953262c1d9
test: separate runs for async-std and tokio 2023-01-28 15:54:59 -08:00
C J Silverio e34dcfdc25
feature(async): Add tokio as an executor option (#36)
This PR is based on the work @alexschrod did in PR #29. All
I did was carry it over the finish line.

This PR adds a feature to the crate named `tokio-runtime`. If
you disable default features and enable this new one, cacache
uses tokio as its async executor. This makes integrating cacache
with tokio-using projects easier, because the file types leak out
if you use anything more than the top-level convenience functions.

The PR implements the feature using shims in a new submodule named
`async_lib`. This module conditionally uses either async-std
or tokio based on feature selection, and hides some differences with
convenience functions.

This change should not be a breaking change, because the default is
still async-std.

There are a few other small changes in this PR worth noting.

- The README shows how to switch runtimes.
- There's a justfile to run common tasks, including those in makefile.toml.
  The default shell is `sh`, so this might not work out of the box for
  Windows users.
- The tests can now run under either runtime. The justfile has a recipe
  that runs them both.
- The benchmarks can also run under either runtime. The justfile has two
  recipe for this, one using bench and the other using criterion's runner.
- The dependencies now pull in async-attributes by default along with
  async-std. This made it easier to swap runtimes in the tests.
- All dependency versions have been bumped.

Co-authored-by: @alexschrod
2023-01-28 13:01:59 -08:00
C J Silverio 6d84ff0aed
fix(write): set tmpfile length in async writer (#35)
Fixes: https://github.com/zkat/cacache-rs/issues/34

The async `poll_write()` implementation was creating a tempfile as
a backing for its inner mmap, but it was failing to set the length
on the file to match the incoming data. Compare with the sync
implementation!

This bug was exposed when the `memmap2` crate was swapped in
for `memmap`. The older crate was likely more lax about this.

Wrote a pair of new tests for `cacache::write_hash_sync` and
`cacache::write_hash`. The async test fails without this change, as
does any benchmarks run. Everything passes with it.

BREAKING CHANGE: This commit also bumps the MSRV for cacache to 1.66.1.
2023-01-23 17:37:34 -08:00
Kat Marchán 1b29e7435c
(cargo-release) start next development iteration 10.0.2-alpha.0 2022-02-25 09:06:47 -08:00
Kat Marchán e083991a54
(cargo-release) version 10.0.1 2022-02-25 09:06:15 -08:00
Kat Marchán 0877e3e942
docs: update changelog 2022-02-25 09:05:36 -08:00
Kat Marchán 684a3e8a68
fix(mmap): mmap needs equal buffer lengths (#33)
Fixes: https://github.com/zkat/cacache-rs/issues/32
2022-02-25 09:04:28 -08:00
Kat Marchán d9291763ce
(cargo-release) start next development iteration 10.0.1-alpha.0 2022-01-23 10:07:47 -08:00
Kat Marchán 54170f4149
(cargo-release) version 10.0.0 2022-01-23 10:07:08 -08:00
Kat Marchán 8741f4af71
docs: update changelog 2022-01-23 10:06:27 -08:00
Christian Haynes 03d4596baa
fix(security): replaced memmap with memmap2 (#30) 2022-01-23 10:04:07 -08:00
Kat Marchán 9c3cf994ec
misc: cargo fmt 2021-09-15 20:32:18 -07:00
Kat Marchán 323ecacc3b
feat(msrv): bump MSRV to 1.54, thanks to socket 2021-09-15 20:30:40 -07:00
Kat Marchán c5aa6dc24f
(cargo-release) start next development iteration 9.0.1-alpha.0 2021-09-15 20:26:22 -07:00
Kat Marchán 64c60e3f41
(cargo-release) version 9.0.0 2021-09-15 20:25:45 -07:00