#ipfs #ipld #car

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

#7 in #ipld

Download history 390/week @ 2023-02-25 286/week @ 2023-03-04 8/week @ 2023-03-11 8/week @ 2023-03-18 6/week @ 2023-03-25 2/week @ 2023-04-01 12/week @ 2023-04-08 13/week @ 2023-04-15 3/week @ 2023-04-22 11/week @ 2023-04-29 18/week @ 2023-05-06 10/week @ 2023-05-13 13/week @ 2023-05-20

52 downloads per month
Used in 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

~4MB
~83K SLoC