3,013
questions
142
votes
4
answers
54k
views
What languages can be compiled to WebAssembly (Wasm)? [closed]
What languages can be compiled to WebAssembly (Wasm)?
I believe right now C, C++, and Rust (experimental) can be compiled to WebAssembly, with the llvm compiler backend, with languages like Java, ...
129
votes
5
answers
105k
views
Compiling Python to WebAssembly
I have read that it is possible to convert Python 2.7 code to Web Assembly, but I cannot find a definitive guide on how to to so.
So far I have compiled a C program to Web Assembly using Emscripten ...
122
votes
3
answers
39k
views
What is the difference between asm.js and WebAssembly?
I have been reading about asm.js and WebAssembly recently:
http://ejohn.org/blog/asmjs-javascript-compile-target/
https://brendaneich.com/2015/06/from-asm-js-to-webassembly/
I am still confused ...
111
votes
5
answers
33k
views
Blazor performance
I would like to start using Blazor, despite the fact that it is still at the alpha level.
As I understand it, Blazor uses WebAssembly to compile C# on the client side.
And I have these questions:
Does ...
71
votes
6
answers
56k
views
How can one generate and save a file client side using Blazor?
I want to have a SPA that's doing all the work client side and even generating some graphs/visuals.
I'd like to be able to have the user click buttons and save the visuals, tables, and other things ...
69
votes
4
answers
14k
views
Why the JVM cannot be used in place of WebAssembly? [closed]
As far as I understood, JavaScript cannot be compiled ahead of time because of it's dynamic nature. So Interpretation and just in time compilation happens at run time, that affects JavaScript ...
64
votes
5
answers
39k
views
How can I access and manipulate the DOM in WebAssembly?
I have recently started using WebAssembly for some of my projects. I am doing this because I heard that WASM is faster than JavaScript.
When I actually started my first WASM project, I realized that I ...
60
votes
5
answers
31k
views
How can I return a JavaScript string from a WebAssembly function
How can I return a JavaScript string from a WebAssembly function?
Can the following module be written in C(++) ?
export function foo() {
return 'Hello World!';
}
Also: Can I pass this to the JS ...
52
votes
6
answers
41k
views
How do I compile a C++ file to WebAssembly?
Suppose I have a simple, self-contained C++ file (math.cpp) like this:
int add(int x, int y) {
return x + y;
}
How would I compile it to WebAssembly (math.wasm)?
Note: I am using the Clang tool-...
49
votes
2
answers
39k
views
How to compile Java to WASM (WebAssembly)?
I wonder can I use Java and compile it to WASM (WebAssembly)?
The list https://webassembly.org/getting-started/developers-guide/ has no Java, Kotlin
GraalVM WASM project https://www.graalvm.org/...
46
votes
1
answer
21k
views
using WebAssembly in chrome extension
I have a chrome extension that includes a complicated function comp_func(data) which takes a lot of CPU by performing many bitwise operations. Because of that, I'm trying to use WebAssembly.
I've ...
40
votes
1
answer
7k
views
How do I use a C library in a Rust library compiled to WebAssembly?
I'm experimenting with Rust, WebAssembly and C interoperability to eventually use the Rust (with static C dependency) library in the browser or Node.js. I'm using wasm-bindgen for the JavaScript glue ...
39
votes
3
answers
22k
views
How can I check if a browser supports WebAssembly?
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?
36
votes
4
answers
28k
views
Blazor EventCallback with Multiple Params - how to respond to event in parent host control
I have a blazor component with an EventCallBack parameter that utilized the new struct format allowing multiple arguments
[Parameter] public EventCallback<(EmployeeShiftDay, DateTime, DateTime)> ...
36
votes
4
answers
23k
views
C# WASM without Blazor
I want to be able to call C# code from JavaScript. The mono project used to have a WASM SDK that you could download from their old Jenkins server, but that is no longer public. Existing docs tend to ...