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
parent
64bc1cfa96
commit
18b281e134
@ -1,10 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
bin/build-emcpp.sh &&
|
||||
cp build/MyMoneroCoreCpp.js monero_utils/;
|
||||
# it's ok if certain combinations of the following error.
|
||||
# e.g. under wasm builds, you wouldn't want cp .wasm to be erroring.
|
||||
# under asmjs builds with .mem file enabled, you'd not want .mem to be erroring.
|
||||
cp build/MyMoneroCoreCpp.wasm monero_utils/;
|
||||
cp build/MyMoneroCoreCpp.wast monero_utils/;
|
||||
cp build/MyMoneroCoreCpp.js.mem monero_utils/
|
||||
cp build/MyMoneroCoreCpp_WASM.js monero_utils/;
|
||||
cp build/MyMoneroCoreCpp_WASM.wasm monero_utils/;
|
||||
cp build/MyMoneroCoreCpp_ASMJS.js monero_utils/;
|
||||
cp build/MyMoneroCoreCpp_ASMJS.asm.js monero_utils/
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue