dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.98k stars 4.66k forks source link

[wasi] single file wasm component per assembly with exports #89574

Open Mr0N opened 1 year ago

Mr0N commented 1 year ago

I suggest adding the ability to compile dll assemblies in *.wasm format. Example execute function from wasm files:https://gist.github.com/cure53/f4581cee76d2445d8bd91f03d4fa7d3b

ghost commented 1 year ago

Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.

Issue Details
I suggest adding the ability to compile dll assemblies in *.wasm format. Example execute function from wasm files:https://gist.github.com/cure53/f4581cee76d2445d8bd91f03d4fa7d3b
Author: Mr0N
Assignees: -
Labels: `arch-wasm`, `untriaged`, `area-VM-meta-mono`, `needs-area-label`
Milestone: -
SamMonoRT commented 1 year ago

cc @radical @pavelsavara - any thoughts?

pavelsavara commented 1 year ago

I think this is feature request to produce native image with AOT and export WASM exports. We are unable to produce pure wasm module for the browser as we have JavaScript dependencies on posix emulation (emscripten).

We hope this would be possible with WASI in the future.

Related WASI https://github.com/dotnet/runtime/issues/86984 Tracking https://github.com/dotnet/runtime/issues/65895

Mr0N commented 1 year ago

I think this is feature request to produce native image with AOT and export WASM exports. We are unable to produce pure wasm module for the browser as we have JavaScript dependencies on posix emulation (emscripten).

We hope this would be possible with WASI in the future.

Related WASI #86984 Tracking #65895

Well, it means compiling packages that have no dependencies on the operating system, for example, various libraries for working with images (ImageSharp) and similar ones.