#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

#590 in Data structures

Download history 826/week @ 2024-01-20 1166/week @ 2024-01-27 643/week @ 2024-02-03 492/week @ 2024-02-10 990/week @ 2024-02-17 1259/week @ 2024-02-24 1334/week @ 2024-03-02 1021/week @ 2024-03-09 1597/week @ 2024-03-16 1056/week @ 2024-03-23 934/week @ 2024-03-30 1664/week @ 2024-04-06 2376/week @ 2024-04-13 1166/week @ 2024-04-20 789/week @ 2024-04-27 786/week @ 2024-05-04

5,346 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