-
Notifications
You must be signed in to change notification settings - Fork 213
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
JS bindings #55
JS bindings #55
Conversation
… Added some bindings and tests for the bindings
…avoid raw memory views, as they can lead to a data corruption; Modify CMake bindings config to make CMake working properly;
…avoid raw memory views, as they can lead to a data corruption; Modify CMake bindings config to make CMake working properly;
…o class; Separated helpers to header and implementation
… js tests to the build dir; Make CMake install npm dependencies after the build; Make tests to require lib from the parent dir
…ore tests for PrivateKey, fixed typings a bit
…nged default compilation target to wasm instead of asmjs
…to all objects in typings
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.
Thank you for all your work Anton!
``` | ||
|
||
Run the build after any changes to the library, including readme and tests, as the library will be deployed from the build directory, and the build system copies all the files from the source dir. | ||
### Run tests |
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 is the browser compatibility like? We should add a note on 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.
It will work in all browsers that support WASM, meaning Chrome, Firefox, Safari, Edge (Not IE, unfortunately). It is ~85% of currently existing devices: https://caniuse.com/#feat=wasm. Browsers support can be extended further by including asm.js
build as well. asm.js
has broader support among older browsers (it's supported by all major browsers since the middle of 2013, except Safari, which is WASM-only). I'm not sure what is the best way to include both builds at the same time in one package, so I've added only WASM build. WASM has wider adoption (because of Safari), and has about 10x faster execution times.
…d as vendored dependency (Chia-Network#55) * build: drop minialloc from build system * depends: drop minialloc from source tree * Squashed 'depends/mimalloc/' content from commit 91ba1f374 git-subtree-dir: depends/mimalloc git-subtree-split: 91ba1f374da66e624841f53f6659da3a8f8f93ea * build: add mimalloc to build system, set as default (de)allocator
Hi! My name is Anton. I'm a JavaScript developer at Dash. As you may know, we are using the bls-signatures library in our core project. We also support BitPay's JS stack, which means that we have a set of wallet JS libraries.
I've ported bls-signatures lib to JavaScript and created bindings. This port uses Emscripten to compile C++ to WASM bytecode. It also includes TypeScript bindings, so the port can be used with typescript and has IntelliSense support in all major IDEs.