bytecodealliance / bytecodealliance/wasmtime-dotnet
WASM that runs in wasmtime will not run in the library
- Dominant language
- C#
- Stars
- 519
- Forks
- 67
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 1
Description
Hello, I have a Rust hello world app:
```
fn main() {
println!("Hello, world!");
}
```
I compile it:
```
cargo build --target wasm32-wasi
```
and can run it in wasmtime `wasmtime run hello-world.wasm` without issue. However, when I run it in my C# app:
```
// See https://aka.ms/new-console-template for more information
using Wasmtime;
var config = new Config();
config.WithWasmThreads(true);
using var engine = new Engine(config);
using var module = Module.FromFile(engine, "hello-world.wasm");
using var linker = new Linker(engine);
using var store = new Store(engine);
var instance = linker.Instantiate(store, module);
var run = instance.GetAction("run")!;
run();
```
and I get this error:
```
Wasmtime.WasmtimeException: 'unknown import: `wasi_snapshot_preview1::fd_write` has not been defined'
```
any thoughts?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.