Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dapplion/rs-car-ipfs
Wrapper for rs-car to read files from IPFS trustless gateways with an async API
https://github.com/dapplion/rs-car-ipfs
Last synced: about 20 hours ago
JSON representation
Wrapper for rs-car to read files from IPFS trustless gateways with an async API
- Host: GitHub
- URL: https://github.com/dapplion/rs-car-ipfs
- Owner: dapplion
- Created: 2023-02-27T08:59:48.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-03T08:45:04.000Z (almost 2 years ago)
- Last Synced: 2024-04-24T05:00:57.458Z (9 months ago)
- Language: Rust
- Homepage: https://crates.io/crates/rs-car-ipfs
- Size: 3.01 MB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rs-car-ipfs
Wrapper for [rs-car](https://crates.io/crates/rs-car) to read files from IPFS trustless gateways with an async API
# lib usage
- To read a single file buffering the block dag [`single_file::read_single_file_buffer`]
- To read a single file without buffering the block dag [`single_file::read_single_file_seek`]# bin usage
```
cargo install rs-car-ipfs --features bin
````car-ipfs` reads a CAR stream from stdin and outputs the file contents to stdout
```
curl "http://localhost:8080/ipfs/QmV3q6mo8oxf2GBuvR7zx7ABFBNP5VrRs3sCr63HQ7kEFC?format=car" | car-ipfs
```On an `Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz` bin `car-ipfs` achieves 75,0MiB/s of throughput.
# Roadmap
- [x] Read CAR for single file buffering all blocks in memory
- [x] Read CAR for single file without buffering blocks in memory
- [ ] Read CAR for multiple files and directories and write to disk