#car #ipld #ipfs

rs-car

Rust implementation of the CAR v1 and v2 specifications

5 releases (3 breaking)

0.4.1 Mar 3, 2023
0.4.0 Mar 3, 2023
0.3.0 Mar 2, 2023
0.2.0 Feb 28, 2023
0.1.0 Feb 27, 2023

#1107 in Data structures

Download history 1013/week @ 2024-07-22 508/week @ 2024-07-29 1052/week @ 2024-08-05 473/week @ 2024-08-12 1039/week @ 2024-08-19 818/week @ 2024-08-26 1443/week @ 2024-09-02 1252/week @ 2024-09-09 507/week @ 2024-09-16 1094/week @ 2024-09-23 774/week @ 2024-09-30 826/week @ 2024-10-07 955/week @ 2024-10-14 647/week @ 2024-10-21 717/week @ 2024-10-28 388/week @ 2024-11-04

2,718 downloads per month
Used in 2 crates (via rs-car-ipfs)

MIT/Apache

1.5MB
766 lines

rs-car

Rust implementation of the CAR specifications, both CARv1 and CARv2.

Usage

let mut file = async_std::fs::File::open(car_filepath).await.unwrap();
let block_stream = decode_car_async_stream(&mut file, true).await.unwrap();

while let Some(item) = block_stream.next().await {
    let (cid, block) = item.unwrap();
    // Do something with CAR block
}

lib.rs:

Rust implementation of the CAR specifications, both CARv1 and CARv2.

Usage

  • To get a block streamer [CarReader::new()]
  • To read all blocks in memory [car_read_all]

Dependencies

~2.5–3.5MB
~70K SLoC