Taritsyn / JavaScriptEngineSwitcher

JavaScript Engine Switcher determines unified interface for access to the basic features of popular JavaScript engines. This library allows you to quickly and easily switch to using of another JavaScript engine.
Apache License 2.0
440 stars 49 forks source link

V8.Net? #69

Closed rjamesnw closed 3 years ago

rjamesnw commented 5 years ago

V8.Net now supports Net Standard, and will be part of the back-end server for the FlowScript VPL system (coming soon). It has an extremely fast interface between the CLR and V8, but in a way that is cross-platform.

Taritsyn commented 5 years ago

Hello, James!

Thanks for information! As soon as I have free time, I'll research your library.

The main thing that your library does not repeat the fate of VroomJs.

rjamesnw commented 5 years ago

I assume you mean abandoned? Hopefully not. ;) V8.Net has been around since 2013. ;)

Taritsyn commented 5 years ago

NuGet package appeared only today.

rjamesnw commented 5 years ago

I meant for .Net 3.5 and 4 since 2013. I never got around to supporting NuGet until now. :) (used to be on CodePlex)

It's also mentioned here for many years: https://en.wikipedia.org/wiki/List_of_ECMAScript_engines

jtreher commented 5 years ago

@Taritsyn Since Edge is switching to V8, it seems practical to support V8 for .net core running on linux as ChakraCore is in wind down mode. If @rjamesnw's project has been maintained for several years, it seems like a good option to move forward to allow us to use V8 on Linux.

Taritsyn commented 5 years ago

@jtreher Have you tried running the V8.Net library under Linux or Mac?

rjamesnw commented 5 years ago

The project currently uses a Visual Studio project to compile the C++ wrapper against the V8 source. I added in support to search and load the correct libraries on Windows or Linux, but as I’m not a Linux guy I never yet compiled any Linux binaries. Others have very easily ported the project to mono in the past (before .Net Core; https://www.nuget.org/packages/V8.Net.Mono/ [outdated now]) without issue. If someone wants to help get the C++ wrapper compiling Linux libraries again it would be welcome; should be easy enough. If I have time in the near future I may fire up Linux myself and give it a go.

tombatron commented 4 years ago

I'm not sure that this is the correct venue for the extended discussion, but I was tinkering around with the V8.Net source under WSL.

I was able to get the V8 source compiled with no issues, though I had major issues getting the actual V8.Net proxy code compiled... Probably because I'm hopelessly out of my depth.

I guess the point of my reply is that it appears that the WSL environment would be sufficient for building and testing a Linux binary.

rjamesnw commented 4 years ago

Thanks for the heads up. I’ve been investigating WSL and may try to work out a solution using that at some point.

tombatron commented 4 years ago

For anyone else following along at home:

I got a little farther in my attempts at getting V8.Net's proxy compiled under Linux. I posted the issue that stopped me in my tracks here: https://github.com/rjamesnw/v8dotnet/issues/28

Another thing that I encountered when trying to use V8.Net under Windows to render a React component is documented here: https://github.com/rjamesnw/v8dotnet/issues/27

Taritsyn commented 3 years ago

I'm closing this issue because the Microsoft ClearScript.V8 7.0 now supports Linux and macOS. In addition, JavaScript Engine Switcher 3.9.0 now uses the official NuGet packages of this library.