#ipfs #ipld #car

rs-car-sync

Rust implementation of the CAR v1 and v2 specifications using standard sync api

2 unstable releases

0.5.0 Sep 8, 2025
0.4.1 Dec 14, 2024

#3 in #car

Download history 21/week @ 2025-08-06 14/week @ 2025-08-13 45/week @ 2025-08-20 35/week @ 2025-08-27 170/week @ 2025-09-03 88/week @ 2025-09-10 68/week @ 2025-09-17 54/week @ 2025-09-24 102/week @ 2025-10-01 48/week @ 2025-10-08 79/week @ 2025-10-15 61/week @ 2025-10-22 5/week @ 2025-10-29 29/week @ 2025-11-05 24/week @ 2025-11-12 25/week @ 2025-11-19

92 downloads per month
Used in 11 crates (2 directly)

MIT/Apache

1.5MB
709 lines

Rust implementation of the CAR specifications, both CARv1 and CARv2.

Usage

  • To get a block iterator [CarReader::new()]
  • To read all blocks in memory [car_read_all]

rs-car-sync

This is a fork of rs-car that only uses standard sync rust api.

The main motivation is to get rid of useless contaminating async api when reading a car file from memory.

Rust implementation of the CAR specifications, both CARv1 and CARv2.

Usage

let mut file = std::fs::File::open(car_filepath).unwrap();
let block_iterator = decode_car_stream(&mut file, true).unwrap();

while let Some(item) = block_iterator.next() {
    let (cid, block) = item.unwrap();
    // Do something with CAR block
}

Dependencies

~4MB
~93K SLoC