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.
Not ready to merge
Dependent branches (must be merged first):
This is a tracking PR for bringing the Javascript bindings up to date with the current Flipper runtime. The JS bindings are designed to be run on
node.js
, not in the browser (however, there is an interesting possibility for using WebUSB in the future to allow web apps to control Flipper).Currently these bindings are not yet fully functional, some of the bugs are still being worked out (things are still segfaulting and I haven't figured out why yet), but they are more organized towards how I expect them to look when they're done. Specifically,
flipper.js
contains all of the "engine" code for dispatching remote calls to Flipper, while all of the binding implementations have their own files.Led
, as the "hello world" of packages, is implemented inled.js
. The layout for all package bindings should look roughly like Led does, with a definition of the module API followed by wrappers for each function in the module.test.js
is a good reference to see how the user-facing API looks, I'll paste it here also:Note that we're making use of language features such as
const
and destructuring, meaning that there is some minimum version ofnode.js
that will be required to use these bindings (I don't remember exactly when those were introduced, but I think it was quite awhile ago).To Do
For this PR:
For JS eventually: