Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Get issue while running with Wasmedge #5

@trumhemcut

Description

@trumhemcut

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions