-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start on basic libipld
crate-level docs.
#182
Open
nathan-at-least
wants to merge
4
commits into
ipld:master
Choose a base branch
from
nathan-at-least:crate-docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
049b530
Extract `libipld` crate docs to `README-libipld.md` for nicer long-do…
a51668f
Start adding `libipld` crate docs that describe the relationship to `…
d22de62
Point out `codec` is to-be-deprecated and recommend `serde-codec` fea…
6910834
Point out `Ipld` represents the IPLD Data Model.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,11 @@ | ||||||
The [Ipld] crate. | ||||||
|
||||||
*InterPlanetary Linked Data* (IPLD) is a data model to enable decentralized data structures that are universally addressable and linkable, which in turn will enable more decentralized applications; see [ipld.io/docs](https://ipld.io/docs/). | ||||||
|
||||||
The *Data Model* is decoupled from a particular *Codec* in IPLD; see [ipld.io/glossary](https://ipld.io/glossary/). The Data Model is represented by the [Ipld] rust enum. | ||||||
|
||||||
# Serde Support | ||||||
|
||||||
In the rust ecosystem, the IPLD Data Model vs Codec distinction is very similar approach to [serde](https://serde.rs), and this crate can leverage `serde` for codecs via the `serde-codec` feature. The [*serde Data Model*](https://serde.rs/data-model.html#types) and the [*IPLD Data Model*](https://ipld.io/glossary/#data-model) are different: `serde` provides a wider range of data types, while it lacks the [`link` kind](https://ipld.io/glossary/#link) which is essential to IPLD's purpose. This crate uses a work-around by encoding `link` types via opaque byte sequences in the `serde` layer. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
This crate began with a separate codec API based on the [codec] module. This API in effect attempts to recreate all of `serde` with support for links which, while cleaner, requires much more effort rather than relying on `serde`. The [codec] module will be deprecated (see [issue #164](https://github.com/ipld/libipld/issues/164)), so new applications should rely on the `serde-codec` feature. |
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,4 +1,4 @@ | ||
//! The `Ipld` crate. | ||
#![doc = include_str!("../README-libipld.md")] | ||
#![deny(missing_docs)] | ||
#![deny(warnings)] | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.