3,055 questions
0
votes
0
answers
52
views
Spawning multiple Web Assembly thread worker is slow on chrome unless Devtools is opened
I made an application that runs a very compute heavy operation when user clicks a button.
This expensive operation is ran from a web assembly worker compiled with Rust. It can spawn multiple workers.
...
0
votes
1
answer
62
views
How to attach the debugger for Flutter Web WASM?
I'm trying to debug a Flutter Web app compiled in WASM mode, but the debugger (DevTools) won’t attach; WebStorm keeps showing Waiting for debug connection... indefinitely.
For context, I'm compiling ...
0
votes
0
answers
56
views
Is it possible to compile C++ that user types to Wasm Client side using web containers
I currently have been trying to use WebContainers + emscripten for my compilation, and i want to know if it is possible, and if not other ways to do it.
hello.js
import { WebContainer } from 'https://...
0
votes
1
answer
48
views
How to fix ERR_INVALID_URL_SCHEME when initializing C# in WebAssembly in node.js?
While I was able to get my C# code running in the browser as WebAssembly, I get errors like this when trying to run any (vitest) unit tests that load the module that initializes .NET:
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯...
1
vote
0
answers
132
views
Compile C++ to WASM in browser client side
Why can't I get it to compile to WASM in the browser client-side, no server? Most recent error:
Error initializing compiler. Check console for details.
Failed to execute 'postMessage' on 'Worker': ...
0
votes
0
answers
51
views
How to use JSExport in two projects in the same web+C# app
I started with a working app with static exported C# methods like
[SupportedOSPlatform("browser")] // suppress CA1416 "only supported on: 'browser'"
public static partial class ...
2
votes
1
answer
84
views
When importing tables or memories, why should the "actual max size" be less than the "expected max size"?
While looking through the WebAssembly 1.0 specification I got confused by the type rules for matching limits when importing memories or tables (section "4.5.2.1 Limits"). This also goes for ...
2
votes
0
answers
45
views
How to share a single WebAssembly.Memory instance between multiple ESM worker threads in Node.js 22?
I am working with Node.js 22 using native ESM and Worker Threads, I'm trying to share a single WebAssembly.Memory instance across multiple workers to avoid duplicating memory.
// main.mjs
import { ...
4
votes
0
answers
137
views
Hydration failed when synchronously instantiating a WebAssembly module inside a client component [closed]
I came across surprising hydration mismatch in a Next.js 15 App Router app when I synchronously instantiate a small WebAssembly module during the render of a client component.
Server builds fine.
On ...
0
votes
0
answers
49
views
ASM_CONSTS mismatch when building two wasm modules using Emscripten: one with -msimd128 and one without #25631
I'm attempting to build a wasm module with Emscripten once with -msimd128 -msse2 and have a fallback without. This uses the makeflags
ifeq ($(P_SIMD),1)
LINKFLAGS += -msimd128 -msse2 // later passed ...
9
votes
0
answers
330
views
Unexpected end of file during Wasm sent package
I work on a live version of the Freeciv game.
It uses the Bevy engine and works in a native and Wasm target. After a long time without testing my Wasm version (I only checked its compile), I have a ...
2
votes
1
answer
87
views
Building Qt6 WebAssembly GUI with Emscripten fails because of missing GLESv2/EGL
I am trying to build a Qt6 GUI project for WebAssembly using Emscripten.
I managed to build the project successfully with nlohmann_json and spdlog.
Now I also want to add the cpr library to use an ...
7
votes
1
answer
244
views
Using zig to compile C to web assembly
I believe that it should be possible to use zig to compile a simple c library to web assembly.
I am using the following c code
// add.c
int add (int first, int second)
{
return first + second;
}
...
0
votes
1
answer
100
views
Duckdb Wasm limitation
I don't know how to check or increase the memory limitation of duckdb wasm.
I'm using chrome and I import some parquet into the browser, one of them has 234Mb of data
I did my research and the limit ...
0
votes
1
answer
60
views
Problem in compiling c++ codes including FFmpeg libraries using em++ into WebAssembly
When I try to compile FFmpeg to WebAssebly I got wasm-ld-13: error: unknown file type: demux.o, I configure and install FFmpeg (ffmpeg-8.0) using:
emconfigure ./configure \
--prefix=$(pwd)/installed ...
0
votes
0
answers
66
views
Problem to run my Qt WebAssembly App via CLion
I am experimenting with Qt for WebAssembly and wrote a small application.
When I build and run it from the console or directly inside Qt Creator, everything works fine.
Now I’d like to use CLion as my ...
0
votes
0
answers
47
views
Issues with OPA/Reg Policy Compilation to WASM
I'm working on a Rego/OPA policy, specifically for checking azure resources diagnostic settings compliant based on specified parameters. However, I'm having several issues when trying to compile my ...
0
votes
0
answers
74
views
emrun "Uncaught DOMException: A network error occurred.", but static webserver works
Trying to learn some webassembly. I've got a minimum hello world:
#include <emscripten.h>
#include <stdlib.h>
#include <stdio.h>
int main() {
printf("hello world");
}
...
2
votes
1
answer
90
views
How are eliminated values reconstructed during deoptimization in V8?
In Speculative Optimizations for WebAssembly using Deopts and Inlining the following statement is made:
The difference is in the code for the slow path. Without deopts, we don’t have the option of ...
1
vote
0
answers
148
views
How to make a TLS connection from Rust WASM code in WASI?
How do I make an outbound TLS connection (not HTTPS) from within WASM in Rust? Using WASI of course (not inside a browser). I've tried tokio_native_tls and rustls. Both fail to compile, saying that ...
1
vote
0
answers
64
views
How do I make it so I don't need a main entrypoint in a WebAssembly module without disabling stdlib?
I get the error:
wasm-ld: error: lto.tmp: undefined symbol: main
Because I try to compile a C or C++ file with Clang compiler to wasm32-wasi. I have defined:
-Wl,--no-entry
But it still insists of ...
1
vote
0
answers
126
views
In Clang how can I remove debug info from my c++ to WebAssembly file with -O3 flag?
If I compile a simple program in C++ with Clang, (actually I'm using Zig c++, but that uses Clang), I compile a WASM program that is 700kb:
zig c++ ./WebAssemblyCompilationTesting.cpp -o myoutput.wasm ...
4
votes
2
answers
139
views
Is sample accurate decoding from an arbitrary FLAC seekpoint possible?
Is FLAC decoded PCM guaranteed to start at the sample of an arbitrary seekpoint, if we fetch via HTTP range request from the seekpoints noted offset (on a fixed frame size e.g. 1024)?
I encounter ...
0
votes
1
answer
188
views
File read/write with Avalonia WebAssembly
I'm currently using Avalonia (with C# and .NET) successfully to produce both Windows and Linux versions of our source code converters and have just started to look at targeting WebAssembly. This would ...
0
votes
0
answers
109
views
Load of WASM with CSP enforced
TLDR (Conclusion - decision made)
We reached the conclusion confirming unsafe-eval will be required by WASM itself. It's now part of the CSP since there's no way to really mitigate unless
WASM does ...
3
votes
1
answer
78
views
Can't link to preview1 functions in rust wasmtime
I'm trying to write some WASM that can read from the local filesystem using WASI. (using wasmtime) But every time I try, I get a runtime error that says:
Error: unknown import: wasi_snapshot_preview1:...
0
votes
0
answers
28
views
In Compose/WasmJS, how do you access composeResources from non-root path?
By default, Compose/WasmJS is loaded from the root path wasmJsMain/resources/index.html.
I'm trying to create a another path in the website like so:
wasmJSMain/
|
+-resources/
|
+-index.html
|
...
0
votes
1
answer
87
views
How to embed a JS file used for JS interop in a WASM class library, in .NET?
I'm in the process of learning how to do JS interop in a .NET WebAssembly application (not Blazor, but an Microsoft.NET.Sdk.WebAssembly SDK app). I already know the basics of how to use the [JSImport] ...
0
votes
0
answers
30
views
Not getting results from dump_wasm_module/dump_wasm_module_path flags in Chromium Browsers
I am using the following the dump_wasm_module and dump_wasm_module_path flags in Selenium to try and dump the text representation of wasm modules (WAT) to disk. Here is how I use them:
chrome_options....
1
vote
0
answers
67
views
Failed to run `npm run build` with wasm file in next.js project
I use my wasm package in a next.js app. The wasm package is written in Rust and compiled by wasm-pack. Everything works very well when I start the app by npm run dev. However, when running npm run ...
1
vote
1
answer
139
views
Parse error in WebAssembly code only in Safari
I have compiled some Java code to WebAssembly via TeaVM. The resulting code runs nicely in Firefox and Chrome but throws an exception in Safari.
CompileError: WebAssembly.Module doesn't parse at byte ...
0
votes
1
answer
88
views
Block execution till a Rust future is resolved on WASM without wasm bindgen
I am using a library (Macroquad) that has an async function with following signature:
async fn load_file(path: &str) -> Vec<u8>
This loads the file and returns the raw bytes.
Is there a ...
0
votes
0
answers
170
views
RuntimeError: unreachable executed from wasm-bindgen
My website has the following JS code running the generated WASM:
import init, {
solve_abrams_strogatz
} from './pkg/langshift.js';
async function run() {
await init();
console.log("...
1
vote
0
answers
64
views
AssemblyScript Wasm radixSort 4× slower than pure JS baseline even with SIMD
I’ve ported a JS radix sort vertex transform benchmark into AssemblyScript Wasm and gone through all the usual optimizations (noAssert, runtime stub, optimizeLevel 3, enable simd, reuse globals, ping-...
0
votes
0
answers
61
views
Why would changing the function signature cause my parameter to be overwritten?
I've been chasing this bug down to a minimal example, but even at this point I can't quite track down what must be the root cause.
I'm calling a C function compiled into WASM using Emscripten. I can ...
-1
votes
1
answer
552
views
FFmpeg WASM Compilation with Hardware-Accelerated H.264/HEVC Decoding
I'm working on a media processing SDK with a substantial C++ codebase that currently uses FFmpeg for video decoding on native platforms (Windows/Linux). I need to port this to browsers while ...
1
vote
1
answer
55
views
InvalidOperationException: Cannot provide a value for property 'QuestionService' on type 'PWAQuestionWASM.Client.Pages.Questions'
I'm trying to make CRUD work on Blazor Webassembly, but absolutely nothing works.
InvalidOperationException: Cannot provide a value for property 'QuestionService' on type 'PWAQuestionWASM.Client.Pages....
0
votes
1
answer
60
views
Strapi in dev mode on cpanel with limited RAM
I have strapi deployed on cpanel with shared hosting environment.
Currently strapi is running successfully on cpanel using the build with the sub-domain setup.
I don't have access to root ssh but I ...
-1
votes
3
answers
324
views
Use Wasm on Vercel Edge
I'm trying to import a .wasm file on Vercel Edge in SvelteKit. The module I'm using is @resvg/resvg-wasm.
When I try like so:
import wasmInline from '@resvg/resvg-wasm/index_bg.wasm?inline';
...
await ...
-1
votes
1
answer
147
views
How to execute dynamic C# code (with logic/formulas) in a browser-side React app without a server?
In my current desktop application, I evaluate dynamic C# formulas at runtime using CodeDomProvider. The formulas are written as C# snippets, and from each snippet I generate a full class and method, ...
1
vote
1
answer
67
views
What is supposed to happen to the block result if there is a branch out of a block?
Consider the following code:
loop $FIRST
block $SECOND (result i32)
i32.constant 1
block $THIRD (result i32)
i32.constant 1
br $FIRST
end
...
0
votes
1
answer
116
views
WASM LlamaEdge won't use GPU; problem fix or change tools?
So I'm trying to toss together a little demo that is essentially: 1) generate some text live and save to a file (I've got this working), 2) have a local instance of an LLM running (Llama3 in this case)...
0
votes
1
answer
114
views
How to deallocate WASM heap memory that is exported to Javascript [closed]
I was trying to find a way to export vector or other heap alocated data to Javascript. I tried this:
use wasm_bindgen::prelude::*;
use std::alloc::{Layout, dealloc};
#[wasm_bindgen]
pub struct ...
0
votes
0
answers
177
views
Nextjs wepback build errors with wasm dependency
I added a dependency to my nextjs project that pulls in another dependency that uses wasm, and I am hitting a wall with the webpack build errors I am getting.
I tried a bunch of different things with ...
0
votes
1
answer
368
views
Installing cargo-leptos on my machine (windows) causes a linker error?
I've been trying to install cargo-leptos on my machine.
I've installed it without issues on another machine before (also windows) but now I'm running into some issues.
When I run
cargo install --...
1
vote
1
answer
142
views
Using a global Wasmtime Linker object in Rust
Everything in this question is specific to the Wasmtime runtime for running WebAssembly modules. I am trying to build a Rust program that would be able to do a very basic form of dynamic linking ...
1
vote
0
answers
59
views
Including Kakadu JPEG2000 Drivers in GDAL3.js
I have downloaded and successfully built the GDAL3.js project, but it does not include any drivers for JPEG2000 (such as Kakadu, or Open JPEG).
I have in the past successfully built the standard GDAL3 ...
3
votes
0
answers
171
views
Why isn't wasm heap memory being freed when I return a vector by value?
Could someone please tell me why my WASM used heap size keeps growing every time I call genVector?
Note, this binding is a very simplified reproduction of the problem.
std::vector<uint8_t> ...
0
votes
1
answer
62
views
Deployment troubles - Blazor WASM Client/Server/Shared setup
I have a problem with deployment of a Blazor WASM solution created in C#. It works perfectly when running in development, but I cannot get it to run after deployment to the web test server
My question ...
2
votes
1
answer
303
views
How to resolve error: "Could not find 'ChartJsInterop.setupChart'" - When using ChartJsBlazor
Im trying to use ChartJsBlazor with my Blazor WebAssemply project in Visual Studio and I've pretty must just copied the guide from the "Getting Started" section (https://github.com/...