-
Notifications
You must be signed in to change notification settings - Fork 117
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
Dat support #1381
base: master
Are you sure you want to change the base?
Dat support #1381
Conversation
"debug": "ndb", | ||
"install": "node ./scripts/preinstall.js && node-gyp configure --msvs_version=2017 && node-gyp rebuild", | ||
"install": "node ./scripts/preinstall.js && node-gyp configure --msvs_version=2017 && node-gyp rebuild && npm run build-dat", |
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.
What does this trigger?
-- Would it be compatible with both the Android and the Magic Leap build toolchains?
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.
This just builds up the browserify-ed bundle from the JS source.
Since browserify is just JS it should work on any platform without any hassle.
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.
I see, that makes sense.
Maybe we could put the output somewhere other than src
in that case? That directory feels like it should only have checked-in source and we already have a build
directory. 🤔
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.
SGTM. Would just build/DatArchive.bundle.js
work for that?
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.
@RangerMauve How would storage be configured on the different platforms here? For example, on Android and Magic Leap there are only certain locations that are writable, which is why we have the whole This PR looks good, but I think we need to ensure compat and across the platforms 👍. |
That's a great point regarding storage! I'm just finishing up bringing the DatArchive API to the SDK and I was thinking of bringing that in to replace node-dat-archive (also for perf reasons). It's got an easy to use |
We generally try to resolve the writable location as If this is a thread-local parameter coming into |
Cool, I'll check that out. I think I'll have time either tomorrow or on Sunday. 😁 |
K, I updated it to use the SDK and got the bundle compiling into |
This might also bring exokit-web support since the SDK should |
Not sure if this is actually working at the moment though. Gonna test it next time I'm on my laptop. :P |
Cool, does it just use a gateway automatically, or something else? |
Yeah! It's connecting to https://discoveryswarm.mauve.moe/ If you want I can help set up an exokit-specific one and configure it to connect there instead. (or whatever other configs we might need) |
Yeah, would prefer not to have any third-party network dependencies. We have Exokit-specific domains we can use. That would only matter for |
Yeah, it's all configurable. Also the SDK will try to auto-detect a local discovery-swarm server if it exists (which gets bundled in dat-store for instance) |
Where would we configure that in this code? |
Basically, we'll need to require There's a swarmOpts object that gets passed into discovery-swarm-web and there you can specify a |
Supports loading URLs from the
dat://
protocol.You can test it out with
://
after the protocolTODO:
Closes #1213
Continuation of #1333.