Commit Graph

193 Commits

Author SHA1 Message Date
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
Kat Marchán f10cb7f0db
doc: update changelog 2021-09-15 20:25:06 -07:00
Kat Marchán 9163a58481
fix(cleanup): general house cleaning, bumping deps, etc 2021-09-15 20:23:00 -07:00
Kat Marchán 8d08e45298
fix(clippy): appease the paperclip 2021-09-15 19:57:58 -07:00
Kat Marchán 97890872d5
feat(license): change license to Apache-2.0
BREAKING CHANGE: This is a significant licensing change. Please review.
2021-09-15 19:52:50 -07:00
Kat Marchán 6fe12822a9
meta: add publishing bits 2021-09-15 19:42:52 -07:00
Kat Marchán 35a09fe961
8.0.0 2020-07-18 10:46:31 -07:00
Kat Marchán ce75a109e5
docs: update changelog 2020-07-18 10:46:02 -07:00
Kat Marchán 803d0c3ede
feat(write): Use mmap for small writes (#26)
BREAKING CHANGE: This bumps the minimum Rust version from 1.39 to 1.43. Thanks, remove_dir_all! >:(
2020-07-18 10:43:38 -07:00
Kat Marchán addf858ab7 7.0.0 2020-04-29 21:40:47 -07:00
Kat Marchán 2f54c6a85b docs: update changelog 2020-04-29 21:40:02 -07:00
Kat Marchán 9dbb3a39d5 docs: add crates.io badge 2020-04-29 19:43:27 -07:00
Kat Marchán c248be6cc6 docs: rename ci workflow and add status badge 2020-04-29 19:41:57 -07:00
Florian Albertz bb815f5f22 feat(errors): remove anyhow and use custom error types (#24)
Co-authored-by: Florian Albertz <git@albertz.io>

BREAKING CHANGE: This changes the exported error type(s) for cacache, making it way easier to do error handling when something goes kaput.
2020-04-29 19:34:43 -07:00
Andreas Rammhold 88a76189fc
fix(list_sync): make sure the public interface allows using the Item type (#25)
Before this change the public interface wouldn't allow downstream users
to use the actual items since it wasn't communicated on the function
signature.

Previously a user would run into errors like this:
> no field `key` on type `<impl std::iter::Iterator as std::iter::Iterator>::Item`
2020-04-21 13:42:19 -07:00
Kat Marchán a746fc0216
meta(ci): improve CI workflow 2019-12-16 20:10:39 -08:00
Kat Marchán 513d55833d
meta: remove Cargo.lock from git 2019-12-16 18:54:59 -08:00
Kat Marchán 2413f2e8b1
meta: committing cargo lock 2019-11-11 20:01:17 -08:00