Closed maraf closed 9 months ago
Hmm, I can't repro it on a separate project. Closing for now
It happends if called before main, which makes sense. My bad
Does sound a little odd, for a NativeLib is should initialize the runtime on the first call. Do you have /p:NativeLib=Shared
in the dotnet publish
?
@yowl Thank you! I missed that one. Anyway that implies producing a library. Is there a way to produce exe but be able to call exports before calling main?
EDIT: Should No https://github.com/dotnet/runtimelab/blob/feature/NativeAOT-LLVM/src/coreclr/nativeaot/Bootstrap/main.cpp#L234
EDIT2: I think I would like the behavior as for <IlcArg Include="--splitinit" />
be enough?CustomNativeMain=true
, but without writing custom native main
I'm having troubles calling wasm export
At first, the wasm export isn't generated until csproj contains
Is it expected? According to https://github.com/dotnet/runtimelab/pull/2232 it should happen automatically, am I right?
But more importantly, if I try to run the export
Module["_BrowserConsoleApp/MyClass!GetAnswer2"]();
it fails withAm I doing something wrong? Am I missing someting?