Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/craftspider/department
An implementation of the Storage API in Rust
https://github.com/craftspider/department
Last synced: 20 days ago
JSON representation
An implementation of the Storage API in Rust
- Host: GitHub
- URL: https://github.com/craftspider/department
- Owner: CraftSpider
- License: apache-2.0
- Created: 2021-08-21T13:32:56.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-08T07:07:51.000Z (2 months ago)
- Last Synced: 2024-10-13T01:45:46.704Z (about 1 month ago)
- Language: Rust
- Size: 186 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# Department
[![crates.io](https://img.shields.io/crates/v/department.svg)](https://crates.io/crates/department)
[![Documentation](https://docs.rs/department/badge.svg)](https://docs.rs/department)
[![MIT/Apache-2 licensed](https://img.shields.io/crates/l/department.svg)](./LICENSE-APACHE)A Rust library hosting a possible implementation of the proposed Storages API,
as well as several of the standard `std` collections implemented with it.Inspired by [storage-poc](https://github.com/matthieu-m/storage-poc), re-implemented
and built upon to provide (hopefully) release-ready functionality.## Features
By default, all features are turned on - but they can be disabled if you only
want specific storages and collections- `std`: Whether to include std error support and other std-only features
- `all_storages`: Enable all storage features
- `inline`: Inline on-the-stack storages
- `heap`: Virtual heap-like storage, can be used on the stack or in a static
- `static`: Storages backed by static memory, stored in the binary
- `alloc`: Storages backed by a standard allocator. Requires the `alloc` crate to be available
- `fallback`: Storage which attempts to store something in one, then falls back to a second storage
- `debug`: Storage which wraps another, and provides a number of runtime checks which panic on certain forms of
UB or incorrect usages.
- `all_collections`: Enable all collection types
- `box`: Include the `Box` type
- `rc`: Include the `Rc` and `Weak` types
- `vec`: Include the `Vec` type
- `string`: Include the `String` type, requires `vec`## Future Work
In the future, more types of storages and collections need to be added, hopefully
up to `std` parity. Tests should be added for all storage types, with coverage for most
edge cases (ZST, alignment requirements, etc).### Missing Collections
- `btree`, an implementation of a `BTreeMap` and `BTreeSet`
- `hash`, an implementation of a `HashMap` and `HashSet`
- `arc`, implementation for atomically ref-counted items
- `os/path`, implementations of `OsString` and `PathBuf`