-
Notifications
You must be signed in to change notification settings - Fork 150
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
Module system + submodules + build script #24
base: master
Are you sure you want to change the base?
Conversation
@@ -213,6 +243,14 @@ var Quiet = (function() { | |||
addReadyCallback(opts.onReady); | |||
} | |||
} | |||
|
|||
var head = document.getElementsByTagName('head')[0]; |
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 is super gross and we should fix it, but I think it's one of the last remaining gross bits.
@@ -0,0 +1,27 @@ | |||
/*global __dirname, require*/ |
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 can't remember whether this file does anything but I added it because it looked vaguely relevant
@@ -0,0 +1,18 @@ | |||
{ |
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 file may well not do anything either
@@ -0,0 +1,106 @@ | |||
#!/usr/bin/env bash |
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 added my build script that converts source into quiet-emscripten.js/quiet-emscripten.js.mem. I think it's appropriate to ship the compiled emscripten stuff on npm, but the github repo ought to include the proper build tools for people who don't want the provided blobs, IMO
@@ -1 +1,4 @@ | |||
libfec.js | |||
src/c_src/emscripten/ |
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.
These are build directories in the emscripten process
For testing purposes it would obviously be nice to have the examples use imports, but not completely required I guess |
* @param {function} [opts.onReady] - Quiet ready callback | ||
* @param {onError} [opts.onError] - User errback function | ||
* @example | ||
* Quiet.init({ | ||
* profilesPrefix: "/", // fetches /quiet-profiles.json | ||
* memoryInitializerPrefix: "/", // fetches /quiet-emscripten.js.mem | ||
* libfecPrefix: "/", // fetches /libfec.js |
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.
n.b. we should be able to get rid of the fec jankiness now. The reason I didn't bundle it before was because it was LGPL, and I was afraid of license taint. Now fec functionality is provided by Quiet's own libcorrect which is BSD-3 licensed, so it's just bundled in (or should be by this new build).
Here's my wishlist for "1.0" and feeling comfortable with putting this on Node. Mostly I feel we shouldn't leak globals and should have an interface that's mostly unlikely to break in the future.
Stretch goals:
cc @virtuacoplenny