Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ReneeGA2020 opened this issue Aug 16, 2024 · 4 comments
Closed

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

ReneeGA2020 opened this issue Aug 16, 2024 · 4 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-Build-mono os-wasi Related to WASI variant of arch-wasm
Milestone

Comments

@ReneeGA2020
Copy link

ReneeGA2020 commented Aug 16, 2024

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

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Aug 16, 2024
@lewing lewing added the os-wasi Related to WASI variant of arch-wasm label Aug 16, 2024
@lewing lewing added this to the 10.0.0 milestone Aug 16, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Aug 16, 2024
@lewing lewing added arch-wasm WebAssembly architecture untriaged New issue has not been triaged by the area owner and removed untriaged New issue has not been triaged by the area owner labels Aug 16, 2024
@pavelsavara
Copy link
Member

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

@ReneeGA2020
Copy link
Author

ReneeGA2020 commented Aug 19, 2024

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?

@pavelsavara
Copy link
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 ?

@ReneeGA2020
Copy link
Author

ReneeGA2020 commented Aug 21, 2024

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

@github-actions github-actions bot locked and limited conversation to collaborators Sep 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono os-wasi Related to WASI variant of arch-wasm
Projects
None yet
Development

No branches or pull requests

3 participants