Skip to content
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

feat: implement Codec trait #28

Merged
merged 2 commits into from
Mar 14, 2024
Merged

feat: implement Codec trait #28

merged 2 commits into from
Mar 14, 2024

Conversation

vmx
Copy link
Member

@vmx vmx commented Mar 8, 2024

The Codec trait from ipld-core allows unified access for encoding,
decoding and extracting links of encoded IPLD data independent of the
codec. It only works when the no-cid-as-bytes feature is disabled,
because the link extraction code is based on Serde.

This commit also makes the Deserializer public, so that it can be
used for ipld-extract-links. Having it public should also help with
issue #25.

@vmx vmx requested review from Stebalien and rvagg March 8, 2024 23:09
@vmx vmx force-pushed the codec-trait branch 2 times, most recently from 845b430 to 2244a89 Compare March 14, 2024 20:27
The `Codec` trait from `ipld-core` allows unified access for encoding,
decoding and extracting links of encoded IPLD data independent of the
codec. It only works when the `no-cid-as-bytes` feature is disabled,
because the link extraction code is based on Serde.

This commit also makes the `Deserializer` public, so that it can be
used for `ipld-extract-links`. Having it public should also help with
issue #25.
@vmx vmx marked this pull request as ready for review March 14, 2024 20:38
@vmx
Copy link
Member Author

vmx commented Mar 14, 2024

The only difference to the already approved version is, that the ExtractLinks from ipld-core is used. CI still passes, hence I'm merging it.

@vmx vmx merged commit 10ac0f7 into master Mar 14, 2024
6 checks passed
@vmx vmx deleted the codec-trait branch March 14, 2024 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants