Crates.io | async_bagit |
lib.rs | async_bagit |
version | 0.2.0 |
source | src |
created_at | 2024-07-20 22:07:46.062435 |
updated_at | 2024-07-31 22:51:31.92004 |
description | Create and load BagIt containers |
homepage | |
repository | https://github.com/deadbaed/async-bagit-rs |
max_upload_size | |
id | 1309900 |
size | 241,851 |
Rust library to create and read BagIt containers.
Nightly feature | Tracking issue |
---|---|
iter_next_chunk |
#98326 |
The BagIt spec wants checksums on payload content inside bags. While this crate handles checksums and can compute checksums on files, this crate does not include any checksum algorithms. I do not want to force crate consumers to use checksum x or y, you will have to provide the algorithm.
Any struct implementing the Digest
trait from the digest
crate will be accepted for checksums computation. Most algorithms in the Rust ecosystem implement this trait already.
I am not an expert, but as of this writing (July 2024) I would recommend using BLAKE3, BLAKE2 or SHA512, in that order.
For opening bags, the crate reads only directories on the file system containing BagIt bags, compression or encryption is out of the scope, you will need to handle that yourself.
When creating bags, the crate will copy files when adding them to the bag. Make sure you have enough storage space and writing permission when creating your bags.
bag creation and validation tools MUST support the SHA-256 and SHA-512 algorithms
. This crate requires you to bring your own algorithm for checksums, so I guess this crate will never be RFC compliant?fetch.txt
: I do not have any use for this yet, and seems a bunch of work to implement itI do not expect this crate to be fully compliant with the RFC or with other tools handling BagIt bags (although I am not against it, on the contrary).
My usage of BagIt will be creating bags with this crate, and opening them with this crate as well.
If you are looking for a sync Rust implementation of BagIt https://github.com/pwinckles/bagr is a nice one!