Skip to content

wasi interop failed to work after .net 9 preview 7 release #106523

Closed

Description

@ReneeGA2020

Description

Wasm import export seems to be broken in this preview.
It looks like the wasmtime recognize the output wasm file to be a component instead of executable wasm file.

Reproduction Steps

run the native sample with
./dotnet.cmd build /p:TargetOS=wasi /p:Configuration=release /t:RunSample src/mono/sample/wasi/native

Expected behavior

Get correct result

Actual behavior

Error: cannot execute a component without --wasm component-model

Regression?

worked fine before .net 9 preview 7

Known Workarounds

No response

Configuration

Tested in windows 11

Other information

No response

Activity

  1. added
    untriaged
    on Aug 16, 2024
  2. added
    os-wasi
    on Aug 16, 2024
  3. added this to the 10.0.0 milestone on Aug 16, 2024
  4. removed
    untriaged
    on Aug 16, 2024
  5. added
    arch-wasm
    untriaged
    and removed
    untriaged
    on Aug 16, 2024
  6. pavelsavara commented on Aug 19, 2024

    @pavelsavara
    Member

    We started producing WASI components and switched to WASI preview2.
    We are not going to support preview 1.

  7. ReneeGA2020 commented on Aug 19, 2024

    @ReneeGA2020
    Author

    We started producing WASI components and switched to WASI preview2. We are not going to support preview 1.

    I assume there will be new sample for interop? As we still need way to invoke outside api?

  8. pavelsavara commented on Aug 19, 2024

    @pavelsavara
    Member

    Native sample is currently broken because of some trimming issue. I'm looking at it as part of #106310

    Interop with C code in the same .wasm core module (which is WASM core import/export) is not related to component-model.
    So I guess you need to upgrade your wasmtime ?

  9. ReneeGA2020 commented on Aug 21, 2024

    @ReneeGA2020
    Author

    Native sample is currently broken because of some trimming issue. I'm looking at it as part of #106310

    Interop with C code in the same .wasm core module (which is WASM core import/export) is not related to component-model. So I guess you need to upgrade your wasmtime ?

    I added <TrimMode>partial</TrimMode> to the native sample and it worked now.
    Thanks for the information.

    So I guess it's actually a trim issue instead of an interop issue

  10. locked and limited conversation to collaborators on Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-Build-monoos-wasi

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions