#car #ipfs #ipld

rs-car

Rust implementation of the CAR v1 and v2 specifications

6 releases (breaking)

0.5.0 Mar 12, 2025
0.4.1 Mar 3, 2023
0.3.0 Mar 2, 2023
0.2.0 Feb 28, 2023
0.1.0 Feb 27, 2023

#1046 in Network programming

Download history 991/week @ 2024-12-03 924/week @ 2024-12-10 726/week @ 2024-12-17 165/week @ 2024-12-24 266/week @ 2024-12-31 993/week @ 2025-01-07 616/week @ 2025-01-14 740/week @ 2025-01-21 478/week @ 2025-01-28 1390/week @ 2025-02-04 1706/week @ 2025-02-11 872/week @ 2025-02-18 985/week @ 2025-02-25 957/week @ 2025-03-04 1131/week @ 2025-03-11 1046/week @ 2025-03-18

4,284 downloads per month
Used in 4 crates (3 directly)

MIT/Apache

1.5MB
764 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–3.5MB
~75K SLoC