Code Monkey home page Code Monkey logo

Comments (6)

jacogr avatar jacogr commented on June 5, 2024

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.

jacogr avatar jacogr commented on June 5, 2024

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.

jacogr avatar jacogr commented on June 5, 2024

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.

kianenigma avatar kianenigma commented on June 5, 2024

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.

kianenigma avatar kianenigma commented on June 5, 2024

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 importing schnorrkel_js_bg.js and that requiring schnorrkel_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.

jacogr avatar jacogr commented on June 5, 2024

Yeap, it is a wasm-pack generation issue, nothing that is introduced elsewhere.

from schnorrkel-js.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.