Home:ALL Converter>Can C++ be called from C# compiled to wasm?

Can C++ be called from C# compiled to wasm?

Ask Time:2019-06-06T03:27:12         Author:Stan Wijckmans

Json Formatter

Does anyone know if it's currently possible to call C++ from C# compiled to wasm (or an Uno Platform app to be more precise)?

I'm fairly new to WebAssembly but I managed to compile a C++ function to wasm and call it from JavaScript. I also got the quick start project from Uno (which allows you to compile UWP apps written in C#/XAML to wasm and run them in the browser) running.

I write both C# and C++ on a daily basis, but what I can't figure out is the "interopping between 2 languages" + WebAssembly combo. I assume I need to compile the code in both languages to 2 separate wasm files and then somehow link them together or load the C++ one at runtime. Is what I want to do even possible at all today?

EDIT: To be clear: the idea is that all code is eventually compiled to wasm.

Author:Stan Wijckmans,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/56466822/can-c-be-called-from-c-sharp-compiled-to-wasm
yy