This repository was archived by the owner on Oct 29, 2024. It is now read-only.
Description I've tried to create a web app and build with wasi. It run well with wasmtime but not with wasmedge . Could you please help take a look?
This is package version using in the app:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<WasiRunnerArgs>--tcplisten localhost:5000 --env ASPNETCORE_URLS=http://localhost:5000</WasiRunnerArgs>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Wasi.AspNetCore.Server.Native" Version="0.1.2-preview.10061" />
<PackageReference Include="Wasi.Sdk" Version="0.1.2-preview.10061" />
<WasmBundleFiles Include="wwwroot\**" />
</ItemGroup>
</Project>
Run well with wasmtime:
wasmtime ./bin/Debug/net7.0/MyWebApp.wasm --tcplisten localhost:5000
info: Microsoft.Hosting.Lifetime
Now listening on: http://localhost:5000
Issue while running with wasmedge:
wasmedge ./bin/Debug/net7.0/MyWebApp.wasm
[2022-11-12 21:32:21.639] [error] instantiation failed: incompatible import type, Code: 0x61
[2022-11-12 21:32:21.640] [error] Mismatched function type. Expected: FuncType {params{i32 , i32 , i32} returns{i32}} , Got: FuncType {params{i32 , i32} returns{i32}}
[2022-11-12 21:32:21.640] [error] When linking module: " wasi_snapshot_preview1" , function name: " sock_accept"
[2022-11-12 21:32:21.640] [error] At AST node: import description
[2022-11-12 21:32:21.640] [error] At AST node: import section
[2022-11-12 21:32:21.640] [error] At AST node: module 👍 React with 👍 2stassss2011 and akhanalcs