#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

#1102 in Data structures

Download history 1635/week @ 2024-09-05 630/week @ 2024-09-12 993/week @ 2024-09-19 910/week @ 2024-09-26 795/week @ 2024-10-03 878/week @ 2024-10-10 802/week @ 2024-10-17 779/week @ 2024-10-24 333/week @ 2024-10-31 384/week @ 2024-11-07 319/week @ 2024-11-14 854/week @ 2024-11-21 901/week @ 2024-11-28 871/week @ 2024-12-05 963/week @ 2024-12-12 389/week @ 2024-12-19

3,314 downloads per month
Used in 3 crates (2 directly)

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.5–3.5MB
~70K SLoC