Questions tagged [webassembly]
WebAssembly (abbreviated Wasm) is a new portable, size- and load-time-efficient format suitable for compilation to the web.
webassembly
2,997
questions
0
votes
0
answers
21
views
kIsWasm always return false / How to compile for WebAssembly support?
Following the official Flutter Wasm documentation (https://docs.flutter.dev/platform-integration/web/wasm) I tried to compile my Flutter Web App for Wasm-support, but constant kIsWasm returns always ...
0
votes
0
answers
3
views
About c++ multithreaded code converted to WebAssembly view rendering problem in js call
var Module = {
print: (function() {
var element = document.getElementById('output');
test_element=document.getElementById('test_element');
// if (element) element....
0
votes
0
answers
35
views
How can I use imported memory in Rust code targeting `wasm32-unknown-unknown`?
I have the following Rust code:
use wasmer::{
imports, AsStoreRef, Function, FunctionEnv, FunctionEnvMut, Instance, Memory, MemoryType,
Module, Store,
};
const WAT_CODE: &str = r#"
(...
0
votes
0
answers
13
views
How to load wasm which uses SharedArrayBuffer in Chromium Embedded Framework application
I am using CEF v116 (C++) for a desktop application and trying to load a WebAssembly bundle. This bundle has a js wrapper layer which allocates memory using SharedArrayBuffer and exposes wasm APIs to ...
0
votes
0
answers
25
views
Chrome extension manifest file and content_security_policy and inline JS script
I'm using https://github.com/mingyaulee/Blazor.BrowserExtension to make a Chrome browser extension using Blazor WASM / Webassembly.
The library generates the HTML and JS for the extension, one of the ...
0
votes
0
answers
33
views
Getting console errors when trying to run model in browser using rust, wasm and wonnx
I'm attempting to embed some text as vectors in the browser using rust, webassembly and wonnx.
When I try and run my model in the demo, I get these errors in the console:
wonnx_embeddings_repro_bg.js:...
0
votes
1
answer
25
views
Assertion Failed: Compiler flags to be set for a linker in qmake file of qt, so that we won't get Uncaught Runtime error , after main() function exits
I am trying to expose a UI(built using qt) on the browser, using Emscripten. Compiled dependencies, and could able to link those to the UI, it got compiled successfully without any errors, but while ...
1
vote
1
answer
32
views
Blazor .Net Core 8: How to use Server Side Component on the Client side?
I want to use the InteractiveAuto feature of WASM. So I want to create my pages on the client side.
But I also want to access server side components that have access to my SQL database.
It seems ...
0
votes
0
answers
36
views
Npm cannot find an executable while running the create-wasm-app JavaScript project template
I have been following a Rust + WebAssembly Tutorial and on the 2nd part of the 2nd chapter, after looking into the files and telling you how to build them, the tutorial asks you to run this command: ...
-1
votes
0
answers
27
views
How to Integrate Wasmer (WASM) with Swift iOS Project?
I am working on an iOS project where I need to integrate a WebAssembly (Wasm) module using the Wasmer runtime. I have successfully compiled my code into a .wasm file, but I am struggling with ...
1
vote
1
answer
49
views
Compiling Raylib-Rust game to WASM
I've successfully compiled my game to WASM with the flags:
EMCC_CFLAGS="-sUSE_GLFW=3 -sGL_ENABLE_GET_PROC_ADDRESS -sASYNCIFY -sASSERTIONS --preload-file src/resources" cargo build --release -...
0
votes
1
answer
28
views
How to load SVG in Flutter web wasm?
I'm currently developing a Flutter web application with the latest Flutter version 3.22.2 and targeting WebAssembly (WASM). I need to render SVG images without relying on HTML or any packages that ...
0
votes
0
answers
12
views
Looking for a way to build a windows / linux / wasm distributed app
I have a few bits of hardware that I can access: some windows/linux computers where I can copy to & run binaries (not all of them are on the same network, but luckily at least one of them has a ...
1
vote
0
answers
27
views
Unresolved reference: multiplatformResources in Kotlin Multiplatform Project using MOKO Resources
`I am working on a Kotlin Multiplatform project and trying to integrate MOKO Resources. I followed the installation instructions according to the official documentation, but I'm encountering an "...
-1
votes
1
answer
46
views
How can I determine if a key is pressed in Dioxus?
I'm working on a dioxus desktop app where I have a long list of check boxes. I want to be able to shift select to check off a range of them at once but can't figure out how to determine if the shift ...
1
vote
0
answers
29
views
Issues with building Speed Dreams using Emscripten
I'm a bit confused on how to build Speed Dreams, an open source racing game, with Emscripten (to port it to the web). When building with 'emcmake cmake' (emscripten's cmake toolchain), the building ...
-1
votes
0
answers
33
views
Osgearth emscripten
I use open scene graph and osgearth libraries to run simple.earth file in linux with this command:
osgearth_viewer simple.earth
this works fine, however, I want to display simple.earth file in web ...
0
votes
0
answers
12
views
How to handle graphics output with Container2WASM
I wanted to see if container2WASM could compile a docker container containing a game like Speed Dreams (open source racing game) to WASM. I am unsure however how to output the graphics from the ...
0
votes
1
answer
53
views
Issue with HttpClient Injection in Blazor WebAssembly .NET 8
I'm encountering an error in my Blazor WebAssembly application running on .NET 8. The error occurs when the application launches:
InvalidOperationException: Cannot provide a value for property 'Http' ...
-1
votes
0
answers
34
views
C# Webassambly with Angular 16
I created a project using C# where I used the following settings:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<...
2
votes
1
answer
118
views
Firebase-admin dependency farmhash-modern throws webassembly error
I'm trying to configure firebase-admin SDK on my nextjs + TS project. Whenever i try to invoke any SDK function, i get a webAssembly error. In my case, i am trying to configure a middleware for the ...
1
vote
1
answer
42
views
How to play audio (mp3) in Compose Multiplatform with Kotlin/Wasm target?
I’m developing a Compose Multiplatform application, and I’m targeting Kotlin/Wasm for the web. I need to play audio (mp3) files within my app, but I’m not sure how to achieve this using Compose ...
0
votes
1
answer
43
views
Why use WASI if WASM supported languages have their own standard libraries?
I might have a fundamental misunderstanding about WASM, tried to google it and read some of the docs, but it is not clear to me yet.
As far as I understand, WASI is an language agnostic API for many ...
0
votes
0
answers
21
views
Dynamic code evaluation is not available in Middlewares or Edge API Routes
./node_modules\mongoose\dist\browser.umd.js Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime Learn More: https://nextjs.org/docs/messages/edge-...
0
votes
0
answers
37
views
I keep getting a deadlock error any time i attempt to make an api call in golang compiled to wasm
As the title describes i am trying to make an api call in golang that is compiled to wasm it works fine when it is run on a machine but returns a deadlock error all go routines asleep whenever i run ...
-2
votes
0
answers
20
views
Stuck on black screen when converting my Pygame project to web using webassembly/wasm | pygbag [duplicate]
So i've created a game called rapid math racing where you do math to win races but as I finished the game, I wanted to convert it to web using wasm so other people can use it. But i encountered an ...
-1
votes
0
answers
52
views
Uncaught (in promise) RuntimeError: memory access out of bounds in Blazor WebAssembly with SQLite
I'm developing a Blazor WebAssembly application that uses SQLite for local storage. I've encountered a RuntimeError: memory access out of bounds error in the browser console. This error seems to occur ...
1
vote
1
answer
34
views
How do I import a golang compiled WASM function into js and use it?
I am trying to import a function from my golang WASM file to use in javascript but anytime i try and use the function i get a undefined error. But if i import my WASM file and then use the console i ...
0
votes
0
answers
47
views
Cannot find global type 'Promise'
I tried to import functions in index.ts.
My codes
const functions = await import("./avs-directory/index").then(
(m) => {
return m;
}
);
I got errors like
tsc -p tsconfig....
0
votes
0
answers
65
views
How do I work with a large (~3gb) file in web assembly
A bit of background:
I would like to avoid using stdweb, because it seems to be unmaintained.
use web_sys::{File as WebFile};
// What I get
pub fn process_emails(file: WebFile, json_file_path: &...
0
votes
1
answer
65
views
how do I import my webassembly into nextjs
as you can see in the picture I copied the contents of pkg to the public nextjs projects folder. The nextjs app is initialized inside my rust lib project.
[package]
name = "chess"
version = &...
0
votes
0
answers
28
views
fixing a blazor wasm System.PlatformNotSupportedException: Cannot wait on monitors on this runtime [duplicate]
foreach (var user in userIdentifiers) {
var response = await client.sendMsgAsync(
accesscode: paswoord,
userIdentifier: user,
...
1
vote
1
answer
24
views
What is the purpose of a Wasm Declarative Element Segment?
The Wasm spec defines 3 kinds of element segments: passive, active, and declarative.
Passive element segments can be used to set the values of a Table at runtime, and Active element segments ...
1
vote
0
answers
47
views
How to Deploy a Kotlin Multiplatform WebAssembly Project on a Web Server?
After building the project using JetBrains' official Kotlin Multiplatform Wizard and selecting only the Web option, I tried to deploy it on the server but only encountered a white screen.
What I Did
...
0
votes
0
answers
25
views
blazor wasm: Nuget package inheritance
Is it possible to create a nuget package of a Blazor WASM standalone that has some generic logic inside of it like; authentication, dependency injection etca. That way when I make a package of it and ...
2
votes
1
answer
47
views
How to compile a wasm via rust to access the Global Val?
Currently, I am working on a project which uses the wasmtime (a wasm runtime implemented by rust) to load and initiate some wasm modules.
And I would like a wasm module to access the global val. So I ...
1
vote
1
answer
18
views
WebAssembly wait & notify not working across wasi threads
I'm trying to make a thread_join function in WebAssembly by setting a mutex to 1 in the main thread, and then launching a thread. the thread unlocks its mutex before exiting. the main thread can get ...
0
votes
0
answers
44
views
RuntimeError: Illegal cast in Kotlin Multiplatform with Decompose and Koin on Web/Wasm target
I'm trying to run a Kotlin Multiplatform project on the Web/Wasm target.
Koin version: 3.6.0-wasm-alpha2.
An error occurs when invoking a factory method to create the Decompose rootComponent.
It works ...
1
vote
0
answers
31
views
Kotlin Multiplatform - wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type
Getting this error when running the web app build using Kotlin Multiplatform in live, but works well on localhost. do we need to do anything with host server?, I am very beginner with this, please ...
0
votes
0
answers
19
views
Why is DateTime.Now returning 4 hours more than my Eastern timezone system time?
I am converting a Blazor Server app to WASM WPA using Visual Studio 2022 Community v 17.10.1. The apps are virtually identical except for the underlying architecture and some backend code that ...
1
vote
1
answer
49
views
Compile C++ Shared Object library to Web assembly
I have C++ data.so shared object library that was compiled for linux_x86 architecture.
I would like to write my application in C++, link to the shared object library but build both of them together ...
0
votes
0
answers
30
views
Split Blazor RenderFragment into a list of RenderFragments
Is it possible to split a RenderFragment into a list of RenderFragments seperated by the parent nodes?
Lets say I have a RenderFragement (without parameters) like this:
<label><InputText />...
0
votes
0
answers
34
views
emscripten_request_pointerlock() returns EMSCRIPTEN_RESULT_UNKNOWN_TARGET
I have made an example that calls emscripten_request_pointerlock("screen", false); by mouse click:
void mousePressEvent(QMouseEvent *event) override
{
EMSCRIPTEN_RESULT result = ...
0
votes
0
answers
21
views
emscripten module usage and multiple instance?
emscripten 1.38.31
I compiled C++ to a pure JS file with the following command line:
call emcc -fno-exceptions -s ASSERTIONS=1 --closure 1 -s MODULARIZE=1 --memory-init-file 0 -s WASM=0 -g0 -v -s ...
0
votes
1
answer
45
views
Does WASM Bindgen copy &mut [u8] zero times or twice?
From JavaScript, I call this Rust function. Does Bindgen copy the memory twice or zero times?
#[wasm_bindgen]
pub fn mod_u8_slice(input_output: &mut [u8]) {
input_output.iter_mut().for_each(|x|...
0
votes
0
answers
42
views
Cors Issues - Nextjs and wasm scripts
I am trying to rewrite deployed Wasm app to nextjs route. Actually I have tried different approaches, but it always fails.
Here's probably the simplest app I wanted to rewrite.
Here's the entry point:
...
0
votes
0
answers
31
views
WebAssembly support for Electron Application
Does WebAssembly support Chromium web browser which is the backend browser for an Electron application? The website mentions that it does support Chrome which is similar to Chromium
2
votes
1
answer
60
views
Build wasm with import memory wasm
I want to write code in rust which I will then compile into wasm so that it uses import memory.
In the compiled file the wasm from rust want to see similar code
(module
(import "host" &...
0
votes
1
answer
55
views
Blazor WebAssembly Standalone App Accessing An Already Authenticated ASP.NET Core Web API
I have set up an ASP.NET Core Web API where I was able to successfully configure authentication where I can post my email and password to API/login and then access API/data where it shows a 401 error ...
0
votes
0
answers
29
views
Preload WASM Module when instantiating another one in Javascript
What is the equivilant of this cmd in JS:
wasmtime run --preload mod0=mod0.wat --invoke 'hello' hello.wasm
The underlying code errors out:
const importObject = {
imports: {
imported_func: arg =&...