All Questions
Tagged with webassembly reactjs
57
questions
0
votes
0
answers
16
views
WASM library fails in Webpack 4
I have React App and we want to use our own WASM library in it.
However after installing I'm getting error on this line (it happens in node_modules)
if (typeof input === 'undefined') {
input = ...
0
votes
1
answer
173
views
I figured out how to use WASM with nextjs via emscripten, but my solution is really stupid
I wanted to call a C++ function from my next.js component. Using emscripten and the -sENVIRONMENT='web' -sMODULARIZE=1 flags, I compiled the C++ into main.js and main.wasm. I tried running it from a ...
0
votes
0
answers
74
views
How to configure stockfish.js
I have been trying to use it had a lot of problems with it.
Tried to put the stockfish files in public file in my react, node and express app with vite. I tried to follow compiling instructions. I am ...
0
votes
0
answers
102
views
how can I load wasm function in a react app
I have some JS code which I am compiling to a Wasm using Javy. I have this working fine and I can run and test the code from the terminal using wasmtime.
I want to run this code from a react app. I'm ...
0
votes
0
answers
42
views
How import NPM files outside of NPM into NextJS
I am using an NPM package called rdkit for my NextJS project. It is basically a emscripten version of the C++ RDKit package. I built the wasm files seperately and now I want to use those file ...
1
vote
0
answers
332
views
How to load a wasm file from an NPM package into a React app lazily with Webpack?
I am actually using Next.js, but it uses React and webpack under the hood. I would like to convert this wasm imagemagick demo to work in React/webpack/Next.js. How do I do that?
The pieces that I've ...
0
votes
1
answer
509
views
Vite + React wasm errors when running rollup browser-side
I'm trying to run the following rollup example: How do I run rollup in the browser?
My stack is a fresh Vite + React project, to which I only added the @rollup/browser package. When running the code ...
0
votes
0
answers
288
views
We render a 3d model on the web by using web-ifc-viewer package in react js code
I am displaying the 3d model through web-ifc-viewer methods (Ifc Viewer API),
But when I use this and every time I load a 3d model it takes a certain amount of memory space.
When changing another 3D ...
0
votes
0
answers
190
views
Setwasmpath error for web-ifc-viewer in Gatsby.js
I have one gatsby.js project to import \*.ifc file and display it in the web browser.
I installed web-ifc-viewer package and copy the 2 files web-ifc.wasm and web-ifc-mt.wasm from its node_modules ...
0
votes
0
answers
60
views
How to clean up A-Frame resources for an "WebAssembly.instantiate(): Out of memory" error?
I'm building a web application with AR and VR experiences using A-Frame and React.js. I have a page that loads an a-scene with its model. After leaving the page, I'm cleaning up the model and entity, ...
2
votes
1
answer
574
views
loading wasm with react-ts and vitejs
Trying to leave webpack and create-react-app for vitejs. but are having problem with a wasm file.
import init from "swaplab2/dist/swaplab2.wasm?init";
import { setSwaplab2 } from "...
0
votes
1
answer
547
views
Accessing WASM functions from vanilla JS inside a React App
I am taking my first steps into using WebAssembly functions in JavaScript (inside React).
I know it's probably not the proper way to do this, but I've wrapped my entire app in the exported Rust ...
0
votes
0
answers
435
views
How to export wasm from an npm package in a way that react.js would be able to use it without plugins?
By default, webpack links your js files from your node modules in order to serve them to your client in react. It does not, however, copy over over assets such as wasm files. Here is a minimal simple ...
0
votes
1
answer
150
views
Compiling Webassembly from C++ using Emscripten
I am trying to compile various C++ files into wasm files to subsequently be embedded in a website. The website is built with React, so I essentially need to find a way to embed wasm files in ...
0
votes
1
answer
253
views
WebAssembly module cant locate .data file when loaded in Comlink WebWorker in React Vite
I try to load a C WebAssembly Module in a React Vite App inside a WebWorker. When loading the Module in the main thread everything works as expected and the wasm.js can locate the wasm.data file ...