Questions tagged [asm.js]

An strict subset of JavaScript that can be used as a low-level, efficient target language for compilers.

asm.js is a strict subset of JavaScript that can be used as a low-level, efficient target language for compilers. This sublanguage effectively describes a safe virtual machine for memory-unsafe languages like C or C++. A combination of static and dynamic validation allows JavaScript engines to employ an ahead-of-time (AOT) optimizing compilation strategy for valid asm.js code.

Resources

134 questions
0
votes
1 answer

Can Emstripten compile the iostream library?

I'm on Ubuntu. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.2 LTS Release: 14.04 Codename: trusty I installed Emscripten. $ sudo apt-get install emscripten I wrote the following C++…
Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271
0
votes
3 answers

Can compile-to-JavaScript tools be used for "regular" client-side development?

In relation to this stack overflow question, I'm wondering what the typical use-cases are for compile-to-JavaScript tools. I've done some research and I've found a list of programming languages that compile to JavaScript, many of which are…
magnus
  • 4,031
  • 7
  • 26
  • 48
0
votes
2 answers

How do I get all key states when using asm.js/emscripten/SDL?

When using SDL for keyboard input only certain keys seems to work (arrows, pageup\pagedown). This is the code I am using: const auto sdlScanCodes = {...SDL_SCANCODE_A, SDL_SCANCODE_F1, SDL_SCANCODE_SPACE, SDL_SCANCODE_LSHIFT…
Viktor Sehr
  • 12,825
  • 5
  • 58
  • 90
0
votes
1 answer

Is there a clever way to check from code whether asm.js is active or not?

Does anyone know of a way to do it from JavaScript without relying on browser version and just assuming that it works?
sutora
  • 36
  • 3
0
votes
1 answer

How to get the IP Machine SMS ID, MAC Address, OS details of a machine through intranet web application in asp.net mvc (without activex object)

Problem: I am stuck up with an issue in which I have to find machine details ( OS version , OS architecture, OS Role host name, SCCM Site code, SCCM Version , IP address, MAC address). Earlier I was doing it using activex Object in which I was…
0
votes
1 answer

Why can't I use 32-bit ints array in ASM.js?

This code works in Firefox nicely - though for some reason, changing the Uint8Array into Uint32array, breaks. Do I need to coerce numbers differently in that case? function Module(stdlib, foreign, heap) { "use asm"; // Variable…
NoBugs
  • 9,310
  • 13
  • 80
  • 146
0
votes
1 answer

How to make the fastest possible bottom-up tree transformer in JavaScript? Should I manage memory on my own?

I am implementing a bottom-up tree transformer in JavaScript. It will be used for an interpreter for a supercombinator reducer, so this algorithm has to be as fast as possible, as it affects every program built on top of it. This is my current…
MaiaVictor
  • 51,090
  • 44
  • 144
  • 286
0
votes
1 answer

Compiling clang/LLVM on win results in compile errors - how to fix?

I've stumbled upon problems installing clang/LLVM on my Win 7 64-bit machine for setting up Emscripten in my Visual Studio 2010 Setup. I was following the official howto from Emscripten at…
user1610743
  • 840
  • 8
  • 24
0
votes
1 answer

AssertionError: asm.js requires -O1 or above

i just started asm.js and stuck at one point. i installed emscripten,clang and node js already and my c program also running fine with emscripten with this command : ./emcc hello_world.c ./emcc hello_world.c -o hello_world.html but when i am…
iOSGhost
  • 182
  • 2
  • 9
0
votes
1 answer

Can you have untyped arrays on Asm.js?

For example, is it possible to construct the following array on Asm.js: var arr = [1,2,[3,4],"test"];
MaiaVictor
  • 51,090
  • 44
  • 144
  • 286
0
votes
0 answers

Why is asm.js same speed or slower in this case?

I was testing some asm.js compilation from the documentation here. Based on their example, I tried this in Firefox 22: function DiagModule(stdlib) { var sqrt = stdlib.Math.sqrt; function square(x) { x = +x; return +(x*x); …
NoBugs
  • 9,310
  • 13
  • 80
  • 146
0
votes
1 answer

Asm.js support in Script#

Would it be practical to add asm.js support to Script#? Where would effort be required?
George
  • 121
  • 2
  • 9
-1
votes
1 answer

How to run Asm.js In IE11, getting legacy_vm_support problem

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 to work in IE11? I complied faac.c and opus.c to…
xuspring
  • 71
  • 6
-2
votes
1 answer

Other than portability and security reasons, why would someone want to run their existing go/rust/c++ applications in web browsers via WebAssembly?

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) and perhaps security reasons, why would someone…
Nathan Aw
  • 545
  • 5
  • 18
1 2 3
8
9