Questions tagged [webassembly]

WebAssembly (abbreviated Wasm) is a new portable, size- and load-time-efficient format suitable for compilation to the web.

WebAssembly

WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable compilation target for programming languages, enabling deployment on the web for client and server applications.

Efficient and fast

The Wasm stack machine is designed to be encoded in a size- and load-time-efficient binary format. WebAssembly aims to execute at native speed by taking advantage of common hardware capabilities available on a wide range of platforms.

Safe

WebAssembly describes a memory-safe, sandboxed execution environment that may even be implemented inside existing JavaScript virtual machines. When embedded in the web, WebAssembly will enforce the same-origin and permissions security policies of the browser.

Open and debuggable

WebAssembly is designed to be pretty-printed in a textual format for debugging, testing, experimenting, optimizing, learning, teaching, and writing programs by hand. The textual format will be used when viewing the source of wasm modules on the web.

Part of the open web platform

WebAssembly is designed to maintain the versionless, feature-tested, and backwards-compatible nature of the web. WebAssembly modules will be able to call into and out of the JavaScript context and access browser functionality through the same Web APIs accessible from JavaScript. WebAssembly also supports non-web embeddings.

Resources

2772 questions
1
vote
1 answer

Why there is only getter for WebAssembly.Memory.buffer? What's the underlying mechanism if the buffer is SharedArrayBuffer?

As we can setup WebAssembly memory as a shared memory via WebAssembly.Memory: wasmMemory = new WebAssembly.Memory({ "initial": NUMBER, "maximum": NUMBER, "shared": true }); WebAssembly.Memory.buffer only has a getter, so I cannot do the…
tigercosmos
  • 345
  • 3
  • 17
1
vote
0 answers

Serilog Not Logging to ElasticSearch in Blazor WebAssembly

I'm currently working on a .NET Standard 2.1 Blazor WebAssembly Hosted application. I use Serilog and I set up ElasticSearch and Kibana on my local machine (localhost:9200). My project structure looks like this: BlazorApp.Client (I want to send…
azzurro123
  • 521
  • 2
  • 10
  • 19
1
vote
1 answer

How to make the Rust Game of Life WebAssembly work as a static website?

I have gone through the tutorial for the Rust Game of Life and have a working game in a web browser, but it only works from the demo web server that comes bundled with it. I can start the server with npm start and it runs the webpack-dev-server on…
penguin359
  • 1,289
  • 13
  • 26
1
vote
0 answers

How to return Go byte array when calling webassembly code in Go?

I want to calculate the Fibonacci sequence result. Here is my Rust code which will return the series of a given number. #[no_mangle] pub extern "C" fn fibonacci(n: usize) -> Vec { let mut x = vec![1, 1]; for i in 2..n { let…
achala
  • 197
  • 1
  • 11
1
vote
1 answer

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…
FlatAssembler
  • 667
  • 7
  • 30
1
vote
1 answer

Blazor EditForm goes over MainLayout when scrolling

I have this Blazor WASM with a MainLayout top with a logo and other things. On a child form I have an Editform this work OK, but when I scroll the page the EditForm scrolls on top of the MainForm instead of under. The other content in the child…
1
vote
6 answers

Can I use SharedArrayBuffer on iOS?

According to Mozilla, there is no browser on iOS supporting the cross-origin-opener-policy, which is one of the security requirements for enabling a SharedArrayBuffer. Does this mean I cannot use a SharedArrayBuffer for any web-application on the…
1
vote
0 answers

Blazor wasm with auth and prerendering - Google index error

i was able to build myself a little blazor wasm page, just 'cause i like c# and i would be happy to maybe have a working homepage for my little business sometime... (I know very little about the stuff I'm using right here, but i struggled my way all…
rkits
  • 21
  • 2
1
vote
1 answer

How do I read a tuple struct from a Wasm memory buffer?

I have defined a tuple struct: pub struct ChangedCell(pub bool, pub u32, pub u32); My Assumption ChangedCell weighs 9 bytes (bool: 1 byte, u32: 4 bytes, u32: 4 bytes) What I Did I returned a pointer, length for Vec to JavaScript: const…
user10298794
1
vote
1 answer

Can I ship Webassembly or run it as Assemblyscript on client side?

Ok so here goes: BIT OF BACKGROUND: I have a vision where browsers (which are the trully cross platform standards of today... and hopefully of tomorrow), are used as a kind of "local server" where you store (indexeddb ... I know its not perfect...…
1
vote
0 answers

How to use a emscripten wasm with react?

I'm not able to get emscripten wasm to work within react. Create a fresh app with create-react-app installed react-app-rewired 2.1.6 and wasm-loader 1.3.0 added config-override.js with const path = require("path"); module.exports = function…
mcd
  • 101
  • 1
  • 7
1
vote
0 answers

QEventLoop slot not called with WASM

I am trying to run the following code: std::string RequestLogin() { std::cout << ">> User Login method..." << std::endl; QNetworkRequest request(this->serverUrl); request.setHeader(QNetworkRequest::ContentTypeHeader,…
Ronak SHAH
  • 171
  • 2
  • 11
1
vote
1 answer

Load different appsettings.json into Window object in Blazor WebAssembly

I'm currently working on a .NET Standard 2.1 Blazor WebAssembly application. I try to load different appsettings.{Environment}.json configurations into my Window namespace (JavaScript). Therefore I follow along this blog…
azzurro123
  • 521
  • 2
  • 10
  • 19
1
vote
3 answers

Blazor Webassembly Configuration (appsettings.json) Loading null values in Component Initially

Blazor WebAssembly App Loads Configuration Values After Executing Methods Resulting in Null's Initialy then it will return with correct values. I followed Microsoft documentation. Appseting File: wwwroot/appsettings.json My Component.razor: @page…
smj
  • 416
  • 1
  • 4
  • 10
1
vote
1 answer

How to read files from a directory in Blazor WebAssembly

I'm currently working on a .NET Standard 2.1 Blazor WebAssembly application. I try to read file paths from my wwwroot directory. The Blazor WebAssembly App is NOT Asp.NET Core hosted. I try to read all file paths with the ending .js from my Main…
azzurro123
  • 521
  • 2
  • 10
  • 19