Commit Graph

17 Commits

Author SHA1 Message Date
Kat Marchán 6062226789
feat(sync-only): add support for removing async runtime dependency altogether (#56) 2023-09-11 12:15:16 -07: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 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 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 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 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
Kat Marchán 743476b274
feat(api): rewrite entire API to be like std::fs (#21)
Fixes: #13

BREAKING CHANGE: The entire API surface has been rewritten and overhauled. Instead of breaking up the package into get/put/rm/ls modules, everything is now available mostly through the toplevel module, following the same conventions as std:fs for its operations. Associated structs and other types have also been renamed. Please refer to the documentation for the new API, and I hope you find it more ergonomic!
2019-10-23 21:17:57 -07:00
Kat Marchán 62298cdf35
feat(errors): improved errors messaging and context (#20)
Fixes: #19

BREAKING CHANGE: Error values have changed. If you were inspecting or
matching against actual return values, you'll need to change your code
to use the new enums.
2019-10-20 23:47:56 -04:00
Kat Marchán fbeb6ec0ff
feat(license): Add in Patron license to make proprietary stuff more clear 2019-10-20 16:42:34 -04:00
Kat Marchán 662aea9b5a feat(async): reorganize async APIs to be the primary APIs
BREAKING CHANGE: the async_* namespaces are gone, and all the previously-sync APIs (get::data, put::data, etc), are all suffixed with _sync now. You'll need to adjust your usage accordingly.
2019-10-17 18:25:20 -04:00
Kat Marchán 4259a39fdf
docs: add basic examples 2019-10-15 13:08:02 -04:00
Kat Marchán 4d9404b9a6
feat(license): relicense to Parity+Apache 2019-10-15 12:15:34 -04:00
Kat Marchán 642e40b47c
fix(license): update the License section of the README 2019-09-07 10:41:43 -07:00
Kat Marchán 19929c5020
doc(readme): filled out README; added CoC and CONTRIBUTING.md 2019-07-01 00:04:52 -07:00
Kat Marchán e5b375525d
docs: added readme 2019-05-20 17:34:11 -07:00