Commit Graph

13 Commits

Author SHA1 Message Date
Christian Haynes acd7f18a87
feat: replaced async-std with smol 2025-07-23 12:03:19 -04:00
Christian Haynes 1c633b62f3
feat: smol runtime feature 2025-07-23 11:06:37 -04:00
Kat Marchán 6062226789
feat(sync-only): add support for removing async runtime dependency altogether (#56) 2023-09-11 12:15:16 -07: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
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
Kat Marchán 8d08e45298
fix(clippy): appease the paperclip 2021-09-15 19:57:58 -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
Kat Marchán ee149a70ca
feat(errors): Replace failure with anyhow crate (#17)
Fixes: #14

BREAKING CHANGE: Result functions now return anyhow::Error
2019-10-20 00:25:28 -04:00
Kat Marchán 4d9404b9a6
feat(license): relicense to Parity+Apache 2019-10-15 12:15:34 -04:00
Kat Marchán 18190bfc35
feat(async): add extra async versions of APIs (#6) 2019-10-13 20:06:20 -04:00
Kat Marchán 473473e6b2
feat(license): relicense under MPL-2.0 (#8)
BREAKING CHANGE: The license terms have changed. Please refer to LICENSE in the root of this repository for details. Future use of this library may require release of source code for any changes applied to it.
2019-09-06 21:39:36 -07:00
Kat Marchán f3b6abf45c
fix(content): make rm use our own Error 2019-06-05 13:41:32 +02:00
Kat Marchán eac29d941b
feat(rm): added content/rm 2019-05-24 17:14:06 -07:00