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
0 answers

Rust wasm: missing export function that is defined in a external crate

I have crate A that defines the required export functions for wasm for re-use. When I try to use this crate in a different lib B, functions from A are missing in the final WASM while functions from B are present. How can I make sure to export the…
vedhavyas
  • 1,101
  • 6
  • 12
1
vote
1 answer

Use ngspice library in WebAssembly

I would need some help with using ngspice as a library in a webassembly (wasm) project. I installed emsdk and newest version of emcc (1.39.20) and downloaded the source of ngspice version 32. To my greatest surprise, I was able to compile ngspice to…
balping
  • 7,518
  • 3
  • 21
  • 35
1
vote
0 answers

"wasm-ld: error: Unknown file type: d000205.o" (wasm and external library)

I have linked an external library with wasm and I get this error while using emcc, with the correct libraries included. My question is very similar to this post, basically the same: Unknow file type: basic_oarchive.o (boost and emscripten)
Ali
  • 56
  • 5
1
vote
1 answer

Fibonacci numbers in WebAssembly doesn't compile

I've tried to make recursive and array-based Fibonacci sequence in WebAssembly, to see which one is faster and therefore to determine whether WebAssembly supports tail recursion optimisation (because I can't find any data about it). (module …
FlatAssembler
  • 667
  • 7
  • 30
1
vote
1 answer

Can I get a computer's hardware information through WebAssembly code in the browser?

I am working on a Video Conferencing web application. I would like to reduce video quality on the computers which have older or less powerful hardware to manage their load. I know it is not possible to get exact hardware information from regular…
WhyDoThis
  • 25
  • 4
1
vote
1 answer

Cannot find main module; see 'go help modules'

I am building a Wasm application and to compile it I have a shell script. When I run it manually from terminal I have the following: /app/Go/assets$ ./script.compile.wasm.sh Wasm compiled The content of the file is: #!/bin/sh GOOS=js GOARCH=wasm…
pigfox
  • 1,301
  • 3
  • 28
  • 52
1
vote
0 answers

How do I build a QBS Item that will facilitate and streamline the building and running of Qt's Web Assembly in QtCreator?

Qt's WebAssembly relies on QMake. I prefer QBS. How do I build a QBS Item that will facilitate and streamline the building and running of Qt's Web Assembly in QtCreator? Will I need to build a .pro file generator, and can this be done with a QBS…
Anon
  • 2,267
  • 3
  • 34
  • 51
1
vote
1 answer

Can I run the Go compiler in the browser?

I recently found out that Go compiles down to WebAssembly. Cool! As per this Go doc, the Go toolchain itself is written in Go. This made me think, can the Go compiler run in the browser? Can I make a website which given a file path through an upload…
user9123
  • 581
  • 1
  • 10
  • 21
1
vote
2 answers

shared:ERROR: BINARYEN_ROOT is set to empty value in /root/.emscripten

I am trying to run a docker image with the following command: docker run -v $PWD/build:/app/build --rm tflite-find-arena-size However this error pops up to me. I am using MacOS. I tried brew install it but that didn't help. I also opened…
Maz jass
  • 11
  • 2
1
vote
0 answers

Compile WASM file from docker-compose

I need to incorporate the wasm build process into docker-compose. While running docker-compose I get the following error: can't load package: cannot find module providing package wasm.go: unrecognized import path "wasm.go": https fetch: Get…
pigfox
  • 1,301
  • 3
  • 28
  • 52
1
vote
1 answer

IdentityServer4 authorization error not matching redirect URI

I have a Blazor WebAssembly application that is hosted in ASP.NET CORE server. I am using IIS in process self-contained deployment and the application is configured as a sub-application of the Default Web Site. So the URL is something like…
lkriz
  • 21
  • 3
1
vote
1 answer

Can't load WASM in a Vue component

In main.cpp: #include EMSCRIPTEN_KEEPALIVE extern "C" { const char *testFunc(const char *parameter) { return parameter; } } Compilation command: em++ .\main.cpp -s EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' -o…
avi12
  • 2,000
  • 5
  • 24
  • 41
1
vote
1 answer

Unity WebGL using WebAssembly Streaming

I'm trying to use webassembly streaming feature but it does not work. I did follow the unity docs instruction of Server configuration for WebAssembly…
dav0803
  • 489
  • 2
  • 7
  • 19
1
vote
1 answer

Blazor WebAssembly - cannot debug an assembly that contains some specific type of code

I try do debug a blazor webassembly app, that references a shared project named Test.Shared. I've been trying to set breakpoints in that projects code but nothing helped - breakpoints just aren't hit. When I'm trying to set a breakpoint outside in…
Sini4ka
  • 33
  • 7
1
vote
1 answer

Passing a pointer to WebAssembly from JavaScript which is not working correctly

Below given is my JavaScript code. a = "hello" a_ascii = []; for (var i = 0; i < a.length; i ++) a_ascii.push(a[i].charCodeAt(0)); a_typedArray = new Float32Array(a_ascii.length) for (let i=0; i
1 2 3
99
100