zksync_object_store

ZKsync implementation of object stores

1 unstable release

0.1.0 Jul 12, 2024
Download history 138/week @ 2024-07-12 21/week @ 2024-07-19 10/week @ 2024-07-26 19/week @ 2024-08-09 55/week @ 2024-08-16 48/week @ 2024-08-23 38/week @ 2024-08-30 41/week @ 2024-09-06 59/week @ 2024-09-13 76/week @ 2024-09-20 43/week @ 2024-09-27 17/week @ 2024-10-04 28/week @ 2024-10-11

176 downloads per month
Used in 23 crates (12 directly)

MIT/Apache

585KB
13K SLoC

Object Store

This crate provides the object storage abstraction that allows to get, put and remove binary blobs. The following implementations are available:

  • File-based store saving blobs as separate files in the local filesystem
  • GCS-based store
  • Mock in-memory store

Normally, these implementations are not used directly. Instead, a store trait object can be constructed based on the configuration, which can be provided explicitly or constructed from the environment. This trait object is what should be used for dependency injection.

Besides the lower-level storage abstraction, the crate provides high-level typesafe methods to store (de)serializable objects. Prefer using these methods whenever possible.


lib.rs:

This crate provides the object storage abstraction that allows to get, put and remove binary blobs. The following implementations are available:

Normally, these implementations are not used directly. Instead, a store trait object (Arc<dyn ObjectStore>) can be constructed using an ObjectStoreFactory based on the configuration. This trait object is what should be used for dependency injection.

Besides the lower-level storage abstraction, the crate provides high-level typesafe <dyn ObjectStore>::get() and <dyn ObjectStore>::put() methods to store (de)serializable objects. Prefer using these methods whenever possible.

Dependencies

~40–56MB
~1M SLoC