#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

#863 in Data structures

Download history 1384/week @ 2024-03-14 1609/week @ 2024-03-21 722/week @ 2024-03-28 1579/week @ 2024-04-04 2031/week @ 2024-04-11 1758/week @ 2024-04-18 783/week @ 2024-04-25 896/week @ 2024-05-02 1089/week @ 2024-05-09 968/week @ 2024-05-16 604/week @ 2024-05-23 773/week @ 2024-05-30 776/week @ 2024-06-06 781/week @ 2024-06-13 896/week @ 2024-06-20 559/week @ 2024-06-27

3,287 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

~4.5MB
~90K SLoC