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.38k stars 192 forks source link

[NativeAOT LLVM] Enable JS interop #2440

Closed maraf closed 8 months ago

maraf commented 8 months ago

Contributes to https://github.com/dotnet/runtimelab/issues/2434

elringus commented 8 months ago

@maraf Sorry if I'm asking something irrelevant here, but do I understand correctly that there are plans to move WASM target from Mono to NativeAOT/LLVM? If that's the case, will the existing "high-level" JS interop API (the JSImport/Export stuff from System.Runtime.InteropServices.JavaScript) still work with the new backend or it'll be something different?

maraf commented 8 months ago

@maraf Sorry if I'm asking something irrelevant here, but do I understand correctly that there are plans to move WASM target from Mono to NativeAOT/LLVM?

There is no such plan at the moment. Anyway NativeAOT/LLVM has come a long way and we are looking at comparison

If that's the case, will the existing "high-level" JS interop API (the JSImport/Export stuff from System.Runtime.InteropServices.JavaScript) still work with the new backend or it'll be something different?

The goal of the https://github.com/dotnet/runtimelab/issues/2434 is to have the same/close as possible API for both Mono and NativeAOT/LLVM in the context of the browser, so that is possible try to wasmbrowser based apps on NativeAOT/LLVM.