Skip to content
Advertisement

Tag: webassembly

Unable to import compiled javascript file from Emscripten for WebAssembly (C++ wrriten) to React

Hi I’ve compiled the C++ file via emcc (emscripten frontends). The output I expected is one .wasm file and .js file to implement javascript. I build React application which try to import WebAssembly via .js module like below. (./wasm/dist/my-module is .js module compiled by emcc) The problem is the console in chrome expresses error “file:// protocol not allow” which is

Odd “Uncaught (in promise) TypeError: can’t convert 50057 to BigInt” error with WebAssembly

I am trying to interface with WebAssembly and am getting a weird error. Firefox DevTools shows it as follows: Uncaught (in promise) TypeError: can’t convert 50057 to BigInt The code that runs right before this error occurs: The WebAssembly files being used here were originally being used in a system interfacing with Swift and a library called WasmInterpreter, so the

Javascript: frame precise video stop

I would like to be able to robustly stop a video when the video arrives on some specified frames in order to do oral presentations based on videos made with Blender, Manim… I’m aware of this question, but the problem is that the video does not stops exactly at the good frame. Sometimes it continues forward for one frame and

Hanging promise canceled

I’m trying to set Cloudflare’s workers to track the circulation of some ERC20 tokens as an exercise to learn web3 and wasm. Thought it could be simple enough, but about 90% of the time so far has been trying to solve this elusive error I look for additional information online, but it seems my error is from a different type(?).

failed to load wasm application

I’m trying to host a website, and I use a .wasm file with .js scripts created by the wasm-pack tool. I tested the project locally with npm and node.js and everything worked fine. But Then I hosted it on a raspberry (apache2), and when I try to access it, I get in the following error: Failed to load module script:

What is the JavaScript equivalent of C++ std::flush?

I am trying to port one of the programs I’ve written in my own programming language to the web using WebAssembly. However, I’ve run into a problem. Namely, one of my programs is supposed to print all the permutations of the digits of a number entered by the user. You can see the live version. The problem is that, when

Loading module was blocked because of a disallowed MIME type (“application/wasm”)

I serve a static file server (through HTTP), which contains data generated by wasm-pack. Using the examples from the rustwasm book, I added this code to my index HTML page: However, on Firefox, I get the error message as indicated in the title: module from “http://localhost:8000/pkg/fstree_web_bg.wasm” was blocked because of a disallowed MIME type (“application/wasm”). I suspected HTTPS issues or

How to read file from disk and pass it to WebAssembly using Go?

Specifically, how to connect <input type=”file”> with this function in Go? I know there is “syscall/js” package, but I didn’t find any examples with file reading. Answer I’ve wanted a satisfactory answer for this for years, finally figured it out the other night. You can essentially boil the whole thing down to: I wrote a little blog post about it

Advertisement