Commit Graph

10 Commits (master)

Author SHA1 Message Date
Paul Shapiro 18b281e134 enabled asmjs as additional build target, and added code to monero_utils/MyMoneroCoreBridge.js with preliminary wasm support detection and fallback to loading separated asm.js file (and different MyMoneroCoreCpp for ASMJS) to remove need for wasm users to load asmjs and asmjs loading code; the asm.js file is separated out from MyMoneroCoreCpp_ASMJS.js with --separate-asm to improve initial load time and, more importantly here, to enable bin/package_browser_js and other webpack like builds to keep the majority of the asmjs separate from the main mymonero_core.js (or e.g. mymonero_app_browser.js) bundle, so that wasm users don't have to load the asmjs along with the main app bundle - however, the overhead of bundling MyMoneroCoreCpp_ASMJS.js into such a main bundle does still exist. in near future, it would be nice to add an option to webpack.config.browser.common.js or bin/package_browser_js or possible just inheriting/alternate versions of those which can opt to remove asmjs support and throw an exception or alert if it's simply not supported - this is probably what MyMonero will move to within a year or two as legacy browsers fade from usage
6 years ago
Paul Shapiro 64bc1cfa96 monero_utils/monero_utils: added webassembly detection with separate flag to indicate availability of asmjs in build (set to off for now until it can be packaged and loaded separately - probably requires exception in webpack config; tweaks to asmjs build flags to improve performance; added tests/web/test_harness.html (run with simple http server having copied webpacked build/mymonero-core.js and build/mymonero_core_js/ to tests/web/
6 years ago
Paul Shapiro ef830ad28a lots of moving things around; implemented promise constructor for monero_utils (which is actually MyMoneroCoreBridge, a new class to replace cnUtil).. this was chosen after trying both promises directly in the functions and async/await in one or two decent patterns in order to avoid the requirement that integrators support async/await and to retain the option for calls to monero_utils to remain synchronous - added src/module-post as a post-js in order to fix emscripten .then infinite loop ... this PR does not include any kind of support for calling from electron renderer to electron main - that is, the code to detect electron renderer, then intercept ret.err_msg and throw only if not in electron renderer, and relay ret.err_msg otherwise has been removed for the moment.. will likely be added back
6 years ago
Paul Shapiro e58ff678d3 openssl build scripts -- pending bridge to new C++ impls, incl bulletproofs
6 years ago
Paul Shapiro b529bdbeaa fix ups to emscripten build procedures; swapped cryptonote_crypto_EMSCRIPTEN with MyMoneroCoreCpp.(js,wasm), and had to introduce blocking to methods which use CNCrypto var due to new async Module init; updated Readme
6 years ago
Paul Shapiro 75a207d428 boost buildchain (download expanded dir contents to contrib/boost-sdk .. may make it a locked submod later but leaving version open for now since we have working 1.6.7) & working monero src sc_reduce32 poc include + JS call
6 years ago
Paul Shapiro 7a7148537c initial emjs build & test chain impl - excluding it from global jest tests pending imminent wasm parent path fix PR merge
6 years ago
HenryNguyen5 3bcaeaf330 Add code coverage command
6 years ago
HenryNguyen5 8a1a595ac6 Add node modules to gitignore
6 years ago
Paul Shapiro 1cd11fa63e initial commit + README
7 years ago