Questions tagged [wasi]
45 questions
0
votes
0 answers
WASI: wasm-ld symbol not found
The following short c example uses the standard c library and therefore requires the wasi sdk:
#include
int main(void)
{
puts("Hello");
return 0;
}
When compiling the code directly with clang to wasm it works without…

Konrad
- 107
- 8
0
votes
1 answer
Is there a way to compile C++ code using the wasi stdlib + pthread support?
I'm new to c++ compiling, tooling, llvm and such. I'm exploring ways of compiling some c++ apps for the browser. I'm not looking for solutions that just run the c++ app. For those situation emscripten seems to be just right. I'm looking for ways to…

Vlad Nicula
- 3,577
- 6
- 32
- 50
0
votes
1 answer
Node WASI vs spawning a child process
In the NodeJS docs it states the following:
The WASI API provides an implementation of the WebAssembly System Interface specification. WASI gives sandboxed WebAssembly applications access to the underlying operating system via a collection of…

Mytch
- 380
- 1
- 3
- 16
0
votes
1 answer
How to run in wee8 wasm code that was compiled from c++ with emcc? (WASI in wee8?)
I am trying to compile C++ code to wasm and then embed it in other C++ code with wee8 (v8's wasm-api). Currently I'm getting a Segfault on instantiating the module:
auto instance = wasm::Instance::make(store, module.get(), imports);
Note that I…

talz
- 1,004
- 9
- 22
0
votes
1 answer
ABI format of WASI functions
I am building a Webassembly runtime and am currently implementing the WASI APIs. I'm wondering how the ABI looks like, according to this document: https://github.com/WebAssembly/WASI/blob/main/phases/snapshot/docs.md
To test, I have compiled this C…

Hellstorm
- 562
- 4
- 23
0
votes
1 answer
Calling console.log from rust wasm32-wasi without the need for ssvm/ssvmup
I would like to debug using messages to the console.log.
We have a rust wasm32-wasi function being called from javascript running in nodejs. We can not use ssvm/ssvmup due to other restrictions.
Is there anything we can do to see messages from our…

Frank C.
- 7,758
- 4
- 35
- 45
0
votes
1 answer
Storing version in WebAssembly application
I've got REST service written in C++/Qt 5.15.x. Under some URL REST service sends WASM stuff. It's a GUI application (REST client) written in C++/Qt 5.15.x. It is possible to embed some function which shows version etc? I'd like to load wasm on the…

ilya
- 1,103
- 14
- 36
0
votes
2 answers
How to call WASI functions directly in C using wasi-sdk (import module problem)
I'm trying to call a WASI function (fd_write) directly in a C program using wasi-sdk. This is the the library (lib.c):
#include
struct Ciovec
{
uint8_t *buf;
uint32_t buf_len;
};
uint16_t fd_write(uint32_t fd, struct Ciovec…

sinan
- 6,809
- 6
- 38
- 67
0
votes
1 answer
WebAssembly.instantiate fails when wasm file was compiled with `clang++`, but works with `clang`
When C/C++ .wasm code is compiled with clang (C) - it loads in Chrome and works well, but when with clang++ (C++) - wasm load fails with error (in JS console):
Uncaught (in promise) LinkError: WebAssembly.instantiate(): Import #1…

KestMa
- 1
- 2
0
votes
1 answer
What is the relationship between WASI and proxy-wasm?
WASI and proxy-wasm seem to have similar goals - defining an ABI to allow interaction of WASM modules with the host environment (i.e. supporting syscalls), with proxy-wasm focussing on modules that are embedded into proxies.
What's the relationship…

dippynark
- 2,743
- 20
- 58
0
votes
1 answer
How to get wasm-ld to honor wasm-import-module attribute
Fixed: I set the DLL storage class of the function I was importing to dllimport, and that allowed wasm-ld to emit the correct import namespace.
I am building a compiler with the LLVMSharp* library, and it emits LLVM .bc module files targeted to…

Ben Leedom
- 13
- 3
0
votes
1 answer
fopen failed when using wasi-libc
I tried to use fopen to read an image when using wasi-libc:
#include
int main()
{
FILE *f = fopen("test.png", "rb");
printf("file %p\n", f);
fclose(f);
}
Build the code with Clang:
$ clang --target=wasm32-wasi…

yushulx
- 11,695
- 8
- 37
- 64
0
votes
1 answer
Failed to build wasmtime in Windows 10
I tried to build wasmtime in Windows 10 but failed.
After running the command cargo build --release, I got the error message:
Done Building Project…

yushulx
- 11,695
- 8
- 37
- 64
-1
votes
1 answer
Edit: Will Wasm/WASI implement processes with message passing?
Do the Wasm/WASI developers ever plan on implementing processes that can communicate with each other through message passing in the Wasm/WASI runtimes (without going through the JS runtime)?
Old question:
Will the WebAssembly runtime be implementing…

Darsunuk
- 13
- 3