-
Notifications
You must be signed in to change notification settings - Fork 25
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 wnfs-unixfs-file
crate for encoding big byte arrays in IPLD
#375
Merged
Conversation
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
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #375 +/- ##
==========================================
+ Coverage 56.89% 56.95% +0.05%
==========================================
Files 45 45
Lines 3334 3334
Branches 830 830
==========================================
+ Hits 1897 1899 +2
+ Misses 884 883 -1
+ Partials 553 552 -1 |
1 task
matheus23
added a commit
that referenced
this pull request
Dec 5, 2023
Previously we only had a CID-based API that just "set" the file CID to some value. This now requires public files to encode their content as byte arrays. Now the public and private APIs are very similar, both operate on the byte-array level for files. Made possible through #375 * feat: Write public files using bytes/streams instead of CID * feat: Support wasm32 target (non-`Send` futures) in unixfs * feat: Write wasm bindings for public file content r&w * fix: Write exchange key itself, instead of CID of it * chore: Write missing docs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adopts some code from iroh-unixfs (from the beetle codebase, previously called "iroh").
The WNFS spec uses UnixFS files as the byte array encoding for public WNFS files.
We've previously put the burden on anyone using rs-wnfs to encode byte arrays and get a CID themselves, now we've got a mechanism inside rs-wnfs to do that. (E.g. previously we've done byte array en/decoding from javascript via js-ipfs-unixfs)