This repository has been archived by the owner on Sep 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
feat: Introduce web bindings and orb
NPM package
#182
Merged
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
aomarks
reviewed
Dec 3, 2022
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.
🎉🎉🎉
Awesome!
Many of these suggestions are optional, in particular the ones around including files
and output
, because it is valid to not include those, but without them you won't take full advantage of incremental build/caching.
Co-authored-by: Alexander Marks <aomarks@google.com>
Co-authored-by: Alexander Marks <aomarks@google.com>
Co-authored-by: Alexander Marks <aomarks@google.com>
jsantell
reviewed
Dec 3, 2022
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.
Just looking through the Rust parts, it's looking excellent
23586fc
to
eb7739e
Compare
jsantell
reviewed
Dec 3, 2022
polyrainbow
reviewed
Dec 3, 2022
jsantell
previously approved these changes
Dec 3, 2022
Co-authored-by: Sebastian Zimmer <SebastianZimmer@users.noreply.github.com>
Merged
This was referenced Dec 10, 2022
This was referenced May 8, 2023
Closed
Closed
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 change proposes a milestone feature for Noosphere: a working NPM package that vends a TypeScript-based library that exposes Noosphere to JavaScript via a Wasm kernel.
In addition to the NPM package, this change includes
wasm-bindgen
-based FFI on the Rust side and a minimum viable Lit + Redux viewer application that is designed to render sphere content when loaded from a commodity IPFS Kubo gateway.In support of the loading-out-of-a-gateway use case, the change includes a feature-gated
KuboStorage
implementation that can wrap anyStorage
implementation.KuboStorage
will "fall back" to looking for blocks from an IPFS gateway if a requested block is not found in local storage. This makesKuboStorage
suitable for read-only Noosphere use cases where an IPFS gateway API may be available.I chose https://github.com/google/wireit to orchestrate builds across Rust and TypeScript packages. Largely thanks to Wireit, we don't need to be aware of yet-another-tool to run correct builds that span multiple source trees. Running
npm run build
from thetypescript
folder is sufficient to build everything (including Rust dependencies) in the intended order. The same goes for running tests:npm run test
from thetypescript
folder will ensure all dependencies are built in time for the tests to run.@aomarks has offered to lend us his scrutiny to make sure we get the most out of
wireit
.Our test suite has also been expanded to include TypeScript tests (which are Mocha-formatted tests that run in headless Chrome). This should get us coverage from the JavaScript side of the web FFI.
Fixes #165