3,056 questions
0
votes
0
answers
49
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
36
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:
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯...
0
votes
0
answers
61
views
Fail to load ffmpeg in web assembly in a quasar application [closed]
I built a quasar application and am trying to process a video in ffmpeg in wasm on client side.
Issue
I managed to install the library and set everything up it seems but running ffmpeg.load() I end up ...
2
votes
1
answer
67
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 ...
4
votes
0
answers
135
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 ...
9
votes
0
answers
323
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 ...
7
votes
1
answer
236
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
53
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
40
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 ...
2
votes
1
answer
89
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
62
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 ...
4
votes
2
answers
133
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
0
answers
101
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 ...
0
votes
0
answers
24
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
0
answers
25
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
1
answer
131
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
0
answers
160
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("...
0
votes
0
answers
57
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
vote
1
answer
48
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....
-1
votes
3
answers
316
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
vote
1
answer
62
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
112
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
1
answer
347
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
0
answers
50
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 ...
0
votes
1
answer
61
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 ...