Closed tagcode closed 2 years ago
Solution?
Solution?
you should use a combination of C and C# :
__attribute__((__export_name__("my_function")))
void greet()
{
_start();
if (!method_HandleIncomingRequest) {
method_HandleIncomingRequest = lookup_dotnet_method("ConsoleApp5.dll", "main", "MainEntry", "Printsomething", -1);
assert(method_HandleIncomingRequest);
}
MonoObject* out_exc = NULL;
mono_wasm_invoke_method (method_HandleIncomingRequest, NULL, NULL, &out_exc);
assert (!out_exc);
}
[DllImport] imports a function from another .wasm binary, but how to export one?
wasm-objdump reveals only "_start."