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

Module system + submodules + build script #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brian-armstrong
Copy link
Member

@brian-armstrong brian-armstrong commented Jan 21, 2019

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.

  • Set up Webpack build
  • Build quiet-emscripten.js in repo with emscripten
  • Linting
  • Don't leak globals
  • Properly fetch quiet-emscripten.js.mem async
  • Break quiet.js up into modules/classes + ES2015?
  • Travis setup that runs build to completion
  • Ship it!

Stretch goals:

  • Move examples to more modern JS, build under webpack
  • Tests via node (depends on being able to invoke webaudio in node)
  • Run Tests in Travis

cc @virtuacoplenny

@brian-armstrong brian-armstrong mentioned this pull request Jan 21, 2019
@@ -213,6 +243,14 @@ var Quiet = (function() {
addReadyCallback(opts.onReady);
}
}

var head = document.getElementsByTagName('head')[0];
Copy link
Member Author

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*/
Copy link
Member Author

@brian-armstrong brian-armstrong Jan 21, 2019

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 @@
{
Copy link
Member Author

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
Copy link
Member Author

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/
Copy link
Member Author

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

@brian-armstrong
Copy link
Member Author

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
Copy link
Member Author

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).

@cayasso cayasso mentioned this pull request May 13, 2020
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.

1 participant