#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

#555 in Data structures

Download history 1027/week @ 2023-11-27 1155/week @ 2023-12-04 601/week @ 2023-12-11 58/week @ 2023-12-18 43/week @ 2023-12-25 915/week @ 2024-01-01 643/week @ 2024-01-08 875/week @ 2024-01-15 828/week @ 2024-01-22 1164/week @ 2024-01-29 648/week @ 2024-02-05 508/week @ 2024-02-12 994/week @ 2024-02-19 1269/week @ 2024-02-26 1339/week @ 2024-03-04 185/week @ 2024-03-11

3,813 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.6–4MB
~74K SLoC