Comments (6)
Additionally -
Uncaught RangeError: WebAssembly.Compile is disallowed on the main thread, if the buffer size is larger than 4KB. Use WebAssembly.compile, or compile on a worker thread.
at Object.eval (schnorrkel_js_bg.js?9681:5)
from schnorrkel-js.
Worked around the circular dep in polkadot-js/common#306, made the WASM init async in polkadot-js/common#307 and fixed dependency as expression in polkadot-js/common#308
(For now, basically some adjustments to the generated files which is being maintained in that repo until there are a general solutions available)
from schnorrkel-js.
Last issue (that I don't have a work-around in for) is the require
here -
module.exports.__wbg_require_86edd37cfda5f13d = function(arg0, arg1) {
let varg0 = getStringFromWasm(arg0, arg1);
return addHeapObject(require(varg0));
};
Cannot see why WASM would need to require. Anyway, for now will just have to deal with the warning in React apps and deal with the bug reports. (Leaning towards just removing/stubbing that and seeing if it still works)
from schnorrkel-js.
I've seen the warning but never really paid much attention to it as
- I personally prefer nodejs for testing.
- I didn't see such an issue in the scope of this project at the beginning. Now with a version published in npmjs I actually do so we have a point here. I'll keep it open and try to find a better fix. It also looks like (as you pointed out) that
wasm-pack
will expand its publish methods so a plan B is to just wait if it doesn't crash anything.
The first circular import is strange and it is coming from code auto-generated from wasm-pack. Very strange.
from schnorrkel-js.
I am no master in webpack and these new fancy import (back in my days there was just require
and nothing more. no imports in the browser) but this like you mentioned:
Due to
schnorrkel_js.js
importingschnorrkel_js_bg.js
and that requiringschnorrkel_js.js
Is actually what exists in the generated files originally, we are also writing it again as a part of our **fix import **.
from schnorrkel-js.
Yeap, it is a wasm-pack
generation issue, nothing that is introduced elsewhere.
from schnorrkel-js.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schnorrkel-js.