Skip to main content
Filter by
Sorted by
Tagged with
37 votes
3 answers
25k views

Find length of line 300* slower First of I have read the answer to Why is my WebAssembly function slower than the JavaScript equivalent? But it has shed little light on the problem, and I have ...
Blindman67's user avatar
  • 54.6k
0 votes
2 answers
480 views

So basically, what I want to do is have a user input some data in an HTML form or something (on client end). Have that data be carried over to a server, where the data is put through some python code ...
Sushrit Pasupuleti's user avatar
4 votes
1 answer
4k views

I'm trying to get up to speed with WebAssembly, relying mostly on WebAssembly developer's guide and a recent JSConf talk. I can compile a token hello world program, and I can view the generated HTML ...
Jeff M's user avatar
  • 2,633
8 votes
1 answer
2k views

Does webassembly have support for trig functions? I mean like built in support because it seems we have to import those from javascript. It would be great if we had things like: f32.sin f32.cos If it ...
Asperger's user avatar
  • 3,262
1 vote
1 answer
777 views

The specification says that 0x40 is: a pseudo type for representing an empty block_type Now im not entirely sure what they mean by that. Even if my block is not empty the compiler would give me 0x40 ...
Asperger's user avatar
  • 3,262
0 votes
1 answer
379 views

In C, strtof("nan(0x200000)", nullptr) represented as 0x7fe00000. But in WebAssembly spec interpreter tests: (assert_return (invoke "f32.reinterpret_i32" (i32.const 0x7fa00000)) (f32.const nan:...
SBKarr's user avatar
  • 548
39 votes
3 answers
25k views

With support for WebAssembly coming into all new major browsers, how can I check whether the current browser which is visiting my website supports it?
Ayush Gupta's user avatar
  • 9,365
4 votes
1 answer
2k views

I want to provide a WebAssembly module with an external JavaScript function that accepts a Rust function pointer. Once this JS module is initialized, it will call the run() function from the .wasm ...
Samo's user avatar
  • 8,240
15 votes
2 answers
4k views

I want to do computations on a large set of data each frame of my web app. Only a subset of this will be used by JavaScript, so instead of sending the entire set of data back and forth between ...
Jakob Mulvad Nielsen's user avatar
30 votes
4 answers
15k views

I created a small Wasm file from this Rust code: #[no_mangle] pub fn hello() -> &'static str { "hello from rust" } It builds and the hello function can be called from JS: <!DOCTYPE ...
rap-2-h's user avatar
  • 32.3k
2 votes
1 answer
1k views

I'm trying to build a common js environment for arbitrary wasm executable modules (for now, presumed generated from emscripten). One of my problems that the wasm output wants a table imported that has ...
Tom Palmer's user avatar
3 votes
1 answer
3k views

Can someone please share the syntax to create a table statically having certain elements and reference it? I could not find any web assembly code doing so. Also some details like can I have multiple ...
abhishek's user avatar
  • 880
4 votes
1 answer
872 views

I have a small WebAssembly program that works correctly when compiled via the following bash script: source_list="../../src/cpp/main/main.cc" emcc -std=c++11 $source_list -o out/index.html -O1 -s ...
Dejas's user avatar
  • 3,651
3 votes
1 answer
745 views

Does anyone know of a list of functions which are available to call from WebAssembly when running in a modern web browser? Or perhaps the answer is that there are no such functions except the ones ...
user1772004's user avatar
18 votes
1 answer
10k views

Currently, a Web Worker is instantiated thus: let worker = new Worker('worker.js'); The browser then fetches worker.js and it can start responding to messages. I'd like to implement my worker's ...
Josh Hansen's user avatar
  • 1,488
4 votes
1 answer
1k views

I would like to pass an array containing imageData from a Canvas to a Rust function to do some calculation with it. I have set the return type to null the get one way data passing to work: JS wasm....
b-m-f's user avatar
  • 1,338
2 votes
1 answer
1k views

I'm trying to obtain the memory address of a WebAssembly buffer and return it to Javascript, so that I can instaniate its memory as a Javascript ArrayBuffer and directly write in an array in the ...
sbtpr's user avatar
  • 561
6 votes
1 answer
9k views

I've been looking a the WebAssembly website and tutorials and I feel a bit lost. I have the following C code : void EMSCRIPTEN_KEEPALIVE hello(char * value){ printf("%s\n", value); } I ...
ElCapitaine's user avatar
15 votes
1 answer
2k views

I'm new to WebAssembly and Emscripten and am trying to pass an array of strings in JavaScript to a C function for further processing with Module.cwrap(...). Ideally I'd also like to return an array of ...
Brannon's user avatar
  • 1,356
0 votes
1 answer
1k views

As title , anyone know webassembly support openmp or not? If support, how to use it? Thanks.
user3404608's user avatar
7 votes
1 answer
2k views

I can generate a fairly minimal (203 bytes) wasm file from the following C code by running emcc -O3 -s WASM=1 -s SIDE_MODULE=1 -o sum.wasm sum.c. #include <emscripten/emscripten.h> int ...
zakm's user avatar
  • 175
2 votes
1 answer
989 views

Importer module: (module (type $GG (func (param i32) (result i32))) (import "low" "load" (func $load (param i32) (result i32))) (table (import "low" "table") 2 anyfunc) (...
abhishek's user avatar
  • 880
0 votes
2 answers
3k views

Is there a known way to get a video stream from the browser back into WebAssembly? I know that you can do frame capture using HTML canvas, but I am unaware of how to get the entirety of the stream (...
Jason Waldrip's user avatar
14 votes
2 answers
4k views

I am trying out a simple example to call a C function compiled to .wasm with JavaScript. This is the counter.c file: #include <emscripten.h> int counter = 100; EMSCRIPTEN_KEEPALIVE int ...
Kilian Obermeier's user avatar
1 vote
1 answer
117 views

What format does WebAssembly compile code to? From official site: WebAssembly or wasm is a new portable, size- and load-time-efficient format suitable for compilation to the web.
Maxim's user avatar
  • 243