-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from eigerco/feat/25/car-implementation
CARv2 implementation
- Loading branch information
Showing
28 changed files
with
3,328 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
edition = "2021" | ||
group_imports = "StdExternalCrate" | ||
hard_tabs = false | ||
imports_granularity = "Crate" | ||
tab_spaces = 4 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[package] | ||
authors.workspace = true | ||
edition.workspace = true | ||
homepage.workspace = true | ||
license-file.workspace = true | ||
name = "mater" # name WIP | ||
repository.workspace = true | ||
version = "0.1.0" | ||
|
||
[dependencies] | ||
async-stream.workspace = true | ||
bitflags.workspace = true | ||
byteorder = { workspace = true, features = ["i128"] } | ||
bytes.workspace = true | ||
digest.workspace = true | ||
futures.workspace = true | ||
indexmap.workspace = true | ||
integer-encoding = { workspace = true, features = ["tokio_async"] } | ||
ipld-core = { workspace = true, features = ["serde"] } | ||
ipld-dagpb.workspace = true | ||
quick-protobuf.workspace = true | ||
serde = { workspace = true, features = ["derive"] } | ||
serde_ipld_dagcbor.workspace = true | ||
sha2.workspace = true | ||
thiserror.workspace = true | ||
tokio = { workspace = true, features = ["fs", "macros", "rt"] } | ||
tokio-stream.workspace = true | ||
tokio-util = { workspace = true, features = ["io"] } | ||
|
||
[dev-dependencies] | ||
rand.workspace = true | ||
|
||
|
||
[lints] | ||
workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Mater | ||
|
||
A Rust library to read and write CAR files. | ||
|
||
This library is based on [beetle](https://github.com/n0-computer/beetle). | ||
|
||
## Specifications | ||
|
||
CARv1 specification: https://ipld.io/specs/transport/car/carv1/ | ||
CARv2 specification: https://ipld.io/specs/transport/car/carv2/ | ||
UnixFS specification: https://github.com/ipfs/specs/blob/e4e5754ad4a4bfbb2ebe63f4c27631f573703de0/UNIXFS.md | ||
|
||
## Developing | ||
|
||
### Overview | ||
|
||
This crate is composed of three main modules: | ||
|
||
- `unixfs/` — which covers the main UnixFS abstractions | ||
- `v1/` — which contains the CARv1 implementation and respective abstractions | ||
- `v2/` — which contains the CARv2 implementation and respective abstractions | ||
|
||
### Further notes | ||
|
||
The [`unixfs_pb.rs`](src/unixfs/unixfs_pb.rs) was automatically generated using | ||
[`pb-rs`](https://github.com/tafia/quick-protobuf/tree/master/pb-rs). | ||
The file was generated and checked-in instead of making `pb-rs` part of the build | ||
because the definition file ([`unixfs.proto`](src/unixfs/unixfs.proto)) does not | ||
change frequently, hence, there is no need to add complexity to the build process. |
Oops, something went wrong.