dotnet / runtimelab

This repo is for experimentation and exploring new ideas that may or may not make it into the main dotnet/runtime repo.
MIT License
1.42k stars 199 forks source link

[NativeAOT LLVM] Produce reactor when compiling OutputType Library on wasi-wasm #2384

Closed RReverser closed 11 months ago

RReverser commented 1 year ago

As per discussion in https://github.com/dotnet/runtimelab/issues/2235#issuecomment-1688374322, there are currently two issues making it hard to produce Wasm libraries with custom imports/exports:

  1. <OutputType>Library</OutputType> should pass -mexec-model=reactor to the linker so that it produces a reactor / library instead of WASI executable.
  2. The generated Wasm should allow to invoke _initialize multiple times - right now it doesn't expect it to be called before any exports.
SingleAccretion commented 11 months ago

This is now fixed.