NEWS (May 27, 2015)
  • Added method {V8Engine}.SetFlagsFromCommandLine(string) to set command line options.
  • Added ability to terminate long script execution by calling {V8Engine}.TerminateExecution().
  • A complete re-vamp of the handle system is now in the dev branch; Much more efficient and reliable!
  • May 11: New release fixes a few bugs. This is an important update for x86 users that rely on the 'isContructCall' parameter of callbacks (includes some type/instance binding scenarios).
  • Latest dev branch update works with the latest Google source updates (as of April 18, 2015, using V8 commit ID `cb1b554a837bb47ec718c1542d462cb2ac2aa0fd`). Also, fixed a marshalling bug on Windows 8 systems.
  • V8.Net will soon be integrated into a new experimental project called "DreamSpace.NET", which uses V8.NET as the backend server for an ASP.NET MVC (with Razor and C#) style project site (much like NodeJS). ASP.NET MVC is supported in Mono as well, so this framework will be a great cross-platform web solution. If that wasn't awesome enough, how about support for INLINE C#->JS code that gets extracted and used server AND client side automatically using NRefactory? ;) There's a prototype of this already. Lots of good stuff to come, so stay tuned ...
  • V8.NET now compiles on Mono, see here: https://v8dotnet.codeplex.com/workitem/1273 (special thanks to chrisber01). While it now compiles, there's no "official" support for it just yet.

Project Description

A fairly non-abstracted wrapper for Google's V8 JavaScript engine.

What does that mean? Well, most other existing wrappers abstract most of the Google V8 engine's abilities away from you. That's fine for simple tasks, but wouldn't you rather have full control over the power of the V8 engine from managed code?

I've carefully crafted a C++ proxy wrapper to help marshal fast data transfers between the V8 engine and the managed side. One of the biggest challenges (which actually turned out to be simple in the end) was storing a field pointer in V8 objects to reference managed objects on call-backs (using reverse P/Invoke). A special custom C# class was created to manage objects in an indexed array in an O(1) design that is extremely fast in locating managed objects representing V8 ones.

Interesting note: I was carefully considering future portability to the Mono framework as well for this project, so great care was made to make the transition as seamless/painless as possible. ;)

License Clarification

The license is LGPL. In a nutshell, this means that you can link to the libraries from your own proprietary code (including code for commercial use), but if you modify the source files for anything in this project, the modified source and executables from it must also be made freely available as well (and you must clearly state you modified the code).

Coming in Next Release / WIP (updated on Jan 19th, 2015):

(NOTE: If I'm posting upcoming changes here, they are usually in the latest development-branch release binaries. Those binary releases will continue to be the bleeding edge releases.)
(see news at the top)

Completed Updates This Release
  • Fixed a bug where '{V8Engine}.call()' doesn't catch and return any exceptions. Previously, exceptions would cause 'undefined' to be returned.
  • Apparently Google has changed a lot of how the API works, and rearranged code in V8 namespaces, so those looking to build from the source had issues. I've fixed it for the most part (in the latest dev branch, including the binaries).
  • Because V8.Net is part of a larger project vision, I'm focusing on the other projects now. I'll be coming back to it off and on as required, and will try to get in some requests/fixes as soon as possible. Thanks, and have a great day! 8)

Future Ideas

I'll also be looking into the WebRTC SDK in the near future as well to help support networkable servers that are compatible to the supported browsers (currently Chrome and Firefox).

Last edited Today at 4:44 AM by jamesnw, version 100