Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
2 votes
1 answer
410 views

I'm using emscripten to generate a file a.wasm.js that contains functions in C++ for encryption. The webassembly functions take in and return C-strings that hold JSON data. I want to wrap these asm.js ...
user491880's user avatar
  • 4,887
0 votes
1 answer
120 views

I took the mother of all random number generators from Agner Fog's library and attempted to make a JavaScript version of this. I expect the bit pattern to be identical but this doesn't seem to be the ...
John Leidegren's user avatar
6 votes
1 answer
2k views

(1) I heard WebAssembly's safety by providing a linear memory. I wonder what does this linear memory contain? Does the wasm stack and heap locate in this memory space? If yes, I think the stack of ...
yeehaw's user avatar
  • 319
1 vote
2 answers
2k views

I upgraded a project from unity 2018 to unity 2020. the webGL build for unity 2020 should default to wasm (Web assembly) but instead it is building the project with asm.js. I can't figure out how to ...
Cethyrion's user avatar
3 votes
0 answers
481 views

I'm trying to write some performance intensive js code so I figured I'd give writing asm.js a try. However whenever I try to instantiate my module with a heap I get the following error in both Node.js ...
Garrett Johnson's user avatar
6 votes
2 answers
3k views

I am not able to call a C function in another JavaScript file, it is giving the error 'called before runtime initialization' please refer to this link I compiled the C code in emscripten as ...
mysterious's user avatar
1 vote
1 answer
60 views

According to the spec, the type "int" in ASM.js does not have signedness. The int type is the type of 32-bit integers where the signedness is not known. In asm.js, the type of a variable ...
Jason Yu's user avatar
  • 2,098
2 votes
0 answers
136 views

As titled, From the specification, it seems I can make sure a value (x) could be evaluated to unsigned only by things like that: x >>> 0. But as I know, here the ">>>" ...
Jason Yu's user avatar
  • 2,098
2 votes
1 answer
6k views

I am practicing WebAssembly at https://github.com/mikerourke/learn-webassembly. I tried to check the result of "without-glue.html", the last step of "chapter-05-create-load-module"....
msm082919's user avatar
  • 707
-2 votes
1 answer
103 views

Understand that WebAssembly code can be executed at near-native speed across different platforms and that it can be run in modern web browsers. Other than the above reasons (portability, performance) ...
Nathan Aw's user avatar
  • 569
1 vote
1 answer
3k views

I'm generating asm.js from a Rust file like so: rustc demo.rs --target asmjs-unknown-emscripten -C opt-level=0 -C link-arg="-s MINIMAL_RUNTIME=1" -C link-arg="-s ENVIRONMENT=web" -C link-arg="-s ...
Sora2455's user avatar
  • 884
1 vote
0 answers
344 views

I'm trying to compile TIFF.js into WASM file and cloned latest version of https://github.com/seikichi/tiff.js/ It's currently present in npmjs repository but in asmjs form. It compiles without errors(...
actualwave's user avatar
2 votes
1 answer
218 views

Here is prime numbers generation algorithm, one with "use asm" and another one (similar) without. In end of live snippet there stats, looks like asm.js runs 4 times slower than pure js, why? asm.js ...
sonnenhaft's user avatar
  • 1,647
1 vote
1 answer
206 views

I am developing new webextension using openpgpjs. The problem is, they use AsmJS for some of their JS functions and I am unable to develop it on firefox. I have encountered problem only on firefox. I ...
Tehryn's user avatar
  • 57
-1 votes
1 answer
584 views

I complied faac.c and opus.c to asm.js. When I run asm.js in IE11, it throws an error message: this is a legacy browser build with legacy_vm_support I do not know whether IE11 support asm.js and how ...
xuspring's user avatar
1 vote
1 answer
1k views

I'm struggling to get webpack working with a set of WebAssembly files compiled using wasm-bindgen. Even if this could be just an issue with webpack, it made me realise I don't fully grasp the ...
Paul Razvan Berg's user avatar
2 votes
1 answer
664 views

TLDR When linking against a static compiled library version of Box2D compilation fails but when including the actual .o files of the Box2D compilation, it works. I am trying to compile a c++ program ...
avoid3d's user avatar
  • 620
0 votes
0 answers
122 views

I have read lots about how fast Emscripten code can be, thus I decided to convert my js application to C++ and then compile to Emscripten. I got about +30% speed increase and it's not the thing I ...
Epsiloncool's user avatar
  • 1,485
4 votes
1 answer
494 views

When using asm.js code some browsers emit a compilation message. This one: Successfully compiled asm.js code (loaded from cache in 201ms) Is there a way to suppress this message?
Nelson Teixeira's user avatar
13 votes
3 answers
10k views

I have a very large javascript application, which contains mostly asm.js code (it's built upon urho3d c++ engine which is them compiled into asm.js). It runs great on most browsers (chrome, firefox, ...
Alexey's user avatar
  • 7,502
3 votes
0 answers
893 views

I want to know how to properly delete the memory of std::vector & std:: map allocated in c++ code. I am sharing my code here # include <vector> # include <stdio.h> # include <...
Srinivas's user avatar
  • 401
1 vote
1 answer
1k views

I want to know how to properly delete the memory of std::vector allocated in c++ code and passed to js as function return. My c++ code is #include <vector> #include <emscripten/bind.h> ...
Srinivas's user avatar
  • 401
1 vote
0 answers
31 views

I have a 3rd party JS library that utilizes a generated *.asm.js file. That file and, the JS glue code, and HTML work fine when started up locally through python -m SimpleHTTPServer 8000. I'd like ...
foamroll's user avatar
  • 813
1 vote
1 answer
4k views

As seasoned web developer I understand that javascript code cannot be secure, but only minified/obfuscated. However, many game engines are confident enough to allow their engine code and the customer'...
FanManPro's user avatar
  • 1,197
2 votes
1 answer
596 views

I'm trying to use emscripten and asm.js in order to speed up my Javascript code. I need to get data from an Int32Array into my compiled C function. According to this Github site I can allocate a ...
David Zhao Akeley's user avatar
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
1k views

I have a rust project I am compiling to webasm per http://asquera.de/blog/2017-04-10/the-path-to-rust-on-the-web/ Project compiles. When I run it in Chrome Canary, it runs out of memory and gives me ...
imichaelmiers's user avatar
1 vote
1 answer
637 views

I'm working on a Unity project, and dealing with WebGL plugin, which is called "jslib" by Unity. While the unity recommend using UnitySendMessage when jslib interactive with c#, I prefer using a ...
Eagle Lau's user avatar
  • 123
16 votes
1 answer
951 views

Imagine I have a asmjs script but before running the script, I'd like to test and see if the browser supports asm.js or not. If it is false, display a message indicating that the browser is old or ...
Afshin Mehrabani's user avatar
6 votes
1 answer
5k views

(New to OpenGL / Emscripten) For a stock trading client application I'm building there is the need of 40+ open charts. About 50% of them being in some sort of 'Free draw' state, meaning they show ...
DutchKevv's user avatar
  • 1,699
1 vote
1 answer
401 views

My aim to to find out the thread ids and process ids of the thread and the process that are running my javascript code. I could find no functions that could provide me this so I use the basic C code ...
vaibhav.pnd's user avatar
1 vote
1 answer
490 views

I'm trying to make a simple Nim app which runs on Emscripten. I'm also using jsbind to call a JavaScript function, namely console.log. I have the following file, test.nim: import jsbind type Window*...
Aaron Christiansen's user avatar
0 votes
1 answer
144 views

(N.B. I'm still confused about how asm.js works and what types of software it can "auto convert", and I'm also still confused about a lot of terminology along the stack of auto conversion from ...
ina's user avatar
  • 19.6k
0 votes
0 answers
284 views

I've got compiled a lib using emscripten, generating mylib.js. Basically its interface is declared at the end of mylib.js: var MyLib = function () { that = {}; that.ptr = MyLib_constructor(); ...
moala's user avatar
  • 5,384
2 votes
0 answers
189 views

I would like to run a a benchmarkjs test on a program that is cross compiled from emscripten. Is there a way to disable the asm.js optimizations to run it with and without asm?
brianxautumn's user avatar
  • 1,172
0 votes
1 answer
64 views

I have the following script: const lib = require('./lib.js'); const fs = require('fs'); const graph = fs.readFileSync('../js-working-dir/add_graph.pb', 'utf8'); const sess = new lib.Session(graph); ...
Tomas Reimers's user avatar
5 votes
4 answers
2k views

I'm curious if it's possible to have emscripten build a binary without libc. If I have simple.c: int add1(int x) { return x + 1; } And I don't want to include any of libc, is that possible? My ...
James Gilles's user avatar
2 votes
4 answers
4k views

I'm planning on using a c++ library for a web application and web assembly seemed like a good tool for this. I am using emscripten for compiling it. I got the source code of this open source c++ ...
Dayeong Lee's user avatar
6 votes
1 answer
2k views

I've got a Rust library with the following usual structure: Cargo.toml src |--lib.rs .cargo |--config (specifies target=asmjs-unknown-emscripten) target |...... When I do cargo build, I get a new ...
user1935361's user avatar
3 votes
1 answer
1k views

When some asm.js code with the use asm; directive gets parsed in Firefox, the console will tell me whether it successfully validated and compiled or not. Something like: Successfully compiled asm.js ...
newprogrammer's user avatar
1 vote
2 answers
856 views

First, check my knowledge c/c++ code >> compile(emscripten [emcc]) >> asm.js code I can get c/c++ code to asm.js code, is it right? asm.js code >> compile(binaryen [asm2wasm]) >...
gyeongseok seo's user avatar
8 votes
3 answers
3k views

Alright, this has been driving me insane. I've been trying this for at least a month, and no where on the internet is helping. I followed the steps of this. Not even the example works when I do these ...
Flarp's user avatar
  • 169
5 votes
0 answers
756 views

I'm following along with the call from JavaScript tutorial. Instead of using node, I'm calling directly from a web browser: hello_world/index.html <!DOCTYPE html> <html lang="en"> <...
goo's user avatar
  • 2,280
2 votes
1 answer
138 views

I'm developing a math web application (http://www-fourier.ujf-grenoble.fr/%7eparisse/xcasen.html) compiled from C++ to javascript by emscripten 1.34.1. Performance are good inside Firefox 45, for ...
Bernard Parisse's user avatar
0 votes
1 answer
369 views

Sorry for the basic question here. I'm trying to wrap my head around Emscripten, ASM.js, and compiling lower level languages to javascript. Here is what I don't understand. You can do things in a ...
Dominic P's user avatar
  • 2,422
2 votes
1 answer
1k views

I have a C function compiled into asm.js with the following parameters: void myfunc(double v1[], double v2[], int v_size, double c) It takes in an array (v1), applies a transformation, then fills ...
Lucas's user avatar
  • 439
2 votes
1 answer
868 views

As I understand Emscripten worker model, it does not support a shared state. However, I can share global variables between the SDL audio callback and my mainloop, which if I understand this correctly, ...
Viktor Sehr's user avatar
  • 13.2k
1 vote
0 answers
82 views

I'm JITing a high-level language to asm.js. For the given function I'm JITing, I have information at branch points as to whether a branch is taken or not. Is it possible to reorder asm.js conditional ...
jr.'s user avatar
  • 1,759
1 vote
0 answers
193 views

I am experimenting with using Emscripten generated code in my Javascript application. The results are pretty disappointing performance-wize. I am seeing 40x slower on Chrome 49.0.2623.110 (compiling ...
griffin2000's user avatar
1 vote
1 answer
1k views

Is it possible to do .FLV to .MP4 conversion on client side by ffmpeg-asm.js? The main issue lot's of mobile video players didn't support flash, but .FLV still popular at the internet ;( Have no ...
Egor Malkevich's user avatar