Questions tagged [wasmtime]
The wasmtime tag has no usage guidance.
wasmtime
40
questions
1
vote
1
answer
18
views
WebAssembly wait & notify not working across wasi threads
I'm trying to make a thread_join function in WebAssembly by setting a mutex to 1 in the main thread, and then launching a thread. the thread unlocks its mutex before exiting. the main thread can get ...
2
votes
1
answer
60
views
Build wasm with import memory wasm
I want to write code in rust which I will then compile into wasm so that it uses import memory.
In the compiled file the wasm from rust want to see similar code
(module
(import "host" &...
1
vote
0
answers
57
views
Webassembly WASM is too slow compared with SH shell
I have basic C program (in below) and converting to WASM using emcc to .wasm file.
#include <stdio.h>
int main() {
// Iterate from 1 to 10
for (int i = 1; i <= 10000000; ++i) {
...
0
votes
1
answer
51
views
wasmtime example doesn't run
I am currently exploring the add example for wasm component which is wasi-0.2, from wasmtime component doc diligently following their example, unfortunately it doesn't run
#[allow(warnings)]
mod ...
0
votes
1
answer
26
views
Why does .NET Wasi.Sdk throw on garbage collection?
When using the .NET WASI SDK it seems the garbage collector throws, either when it runs itself in the background or when called explicitly.
I lodged an issue on Github but Microsoft are not responding ...
0
votes
1
answer
122
views
Does any wasm runtime has a support for micropython (For RPI_PICO board)
I am trying to import a wasm runtime ( to be specific pywasm3) in my thonny editor that supports micropython , I get an error stating no module named pywasm3 , Is there any runtime which can be ...
1
vote
0
answers
31
views
how to get the Golang function pointer and the external program can call this function by the pointer?
First call the update function, and then call an asynchronous function ic0.Call_new. Pass the pointer address of the callback function ic.Call_new as a parameter. The host env will call the callback ...
0
votes
1
answer
164
views
How to disable async in wasmtime::component?
Test Case
WIT:
package component:adder;
/// An example world for the component to target.
world example {
export add: func(x: s32, y: s32) -> s32;
}
WASM:
use anyhow::Context;
use std::path::...
3
votes
1
answer
381
views
What is `offset` in wasmtime Memory.read?
Problem
I've got wasmtime up-and-running, calling a TinyGo WASM/WASI module from a Rust host. All is well until I try to return a string from the Go WASI module, which seems like something everyone ...
0
votes
0
answers
47
views
my webassembly chess ai project doesnt run on python
I have a chess ai project I have written in c++ and compiled it to webasembly with emcc
then I wanted to serve it in a server as a webservice and I decided to use python wasmtime library for it
when I ...
1
vote
0
answers
167
views
Want to convert go gRPC client and server into WASM and run it successfully
I've a basic go grpc client and server running fine and I want to change the client and server into WASM and want to run the wasm file to communicate between server and client through that WASM file ...
0
votes
0
answers
132
views
WASI interface in wasmtime-dotnet print to stdout
I'm trying to use the WASI interface in wasmtime-dotnet
. I am trying to print to stdout. - I also want to read input and so on. Here's the WebAssembly Text (wat) code that I'm using for testing:
(...
3
votes
1
answer
2k
views
Calling a WASM function that returns a string from Wasmtime
At a high level I am trying to create a Rust host program that loads a WASM module at runtime using Wasmtime and calls a WASM function that returns a string. I can get this working with numeric types ...
1
vote
2
answers
618
views
Can't run a wasm file in mac using wasmtime
My go code
package main
import "fmt"
func main() {
fmt.Println("Hello Web Assembly!")
}
Then I build the wasm file using the following command
GOOS=js GOARCH=wasm go build -o ...
4
votes
1
answer
518
views
Golang to wasm compilation using tinygo. Execution using wasmtime
I have the following test code
func main() {
path, err := os.Getwd()
log.Println(path, err)
files, err := ioutil.ReadDir("/etc/dse")
log.Println(files, err)
}
I compile it ...