My favorites | Sign in
Project Hosting will be READ-ONLY Thursday at 3:00pm UTC for up to 3 hours for network maintenance.
Project Home Downloads Wiki Issues Source
Search
for
HomePage  
v8-juice project introduction page
Topic-Project, Featured
Updated Jul 20, 2011 by sgbeal@gmail.com

Welcome to v8-juice!

v8-juice (v8 (J)avaScript (U)serland (I)ntegratable (C)omponents (E)mporium) is a C++ library for extending the v8 JavaScript engine. It includes components such as a plugins API, a type-conversion API, utilities for creating new JS-side classes from C++, and for binding near-arbitrary native functions to arbitrary JS objects. It has extensive API documentation, and supplemental documentation can be found via the Wiki link at the top of this page.

Alternately, the V8Convert API provides a header-only library which implements the core type conversions and class binding features, omitting features which would require non-header implementations.

To any members of the Campbell Soup Company: i would really appreciate it if you guys don't sue me over this project's name :-D. It's all in good fun! (And it took me 10 minutes to come up with a project name for which 'JUICE' is an appropriate acronym. So i beg you, please don't let that effort be in vain!)

Code/Project status

v8-juice is primarily an experimentation ground, and not a product which aims to have a "1.0" release (it uses the release date as its version number). That said, i like to keep my own client code working, and will try not to make any major changes which break things unless there is a good reason to do so. Also, the core library parts (primarily the type conversions, which are the most-central component) are based off of much older implementations i wrote for SpiderMonkey, and they've had a stable interface for some years now.

v8-juice is believed to work well, without any undocumented crash conditions and whatnot. It is used in at least one high-profile commercial product (which i unfortunately am not at liberty to name) to simplify the C++/JS binding process. In particular, the newer V8Convert API makes binding C/C++ functions and classes to JavaScript really simple (making it any simpler would probably require a code generator).

Having said that: since mid-2011, v8-juice itself is relatively static. It is actively maintained and reported bugs will be fixed insofar as is possible within the library's current architecture and compatibility constraints. Future work is going mostly into the V8Convert API, however, and at some point the main v8::juice API will likely be re-based on top of v8::convert, in effect becoming a 3rd-party user of the v8::convert API. V8Convert focuses primarily on the conversion of types and functions between C++/JS. v8::juice does that, plus adds several "heavy-weight" features like a plugins API. The main difference between the two APIs is that V8Convert is header-only, whereas v8-juice is much more heavyweight and cannot realistically be implemented as a header-only library.

Related work

  • vu8 provides many of the same features as v8-juice, and is one of the few bindings frameworks i've seen which uses templates to generate the bindings (as opposed to macros). Its class- and module-binding system is also easier to use that juice's. If i wasn't using v8-juice, i'd be using vu8. The V8Convert spin-off API was largely inspired by vu8.
  • cproxyv8 is very similar in purpose to v8-juice, and appears to provide largely the same feature set for binding C++ types to v8.
  • v8cgi encapsulates features for hosting server-side web applications written in JavaScript.
  • nodejs has a very impressive set of functionality and a well-thought-out module loading system. It is arguably the most popular v8-using project aside from the various Chromium-based browsers.
  • Flusspferd is a similar library written for use with the SpiderMonkey JavaScript engine. (No longer maintained, as of mid-2011.)
  • SpiderApe is another (no longer maintained) C++ wrapper for the SpiderMonkey engine, and v8-juice's type-conversion API was originally adapted from that library.

One of the interesting things about vu8, cproxyv8, v8cgi, and nodejs is that they're not mutually exclusive with v8-juice. While there is some overlap in functionality, each can provide some parts which the other cannot. e.g., in my humble opinion v8-juice's main strengths lie in its native/JS type-conversion bits, whereas nodejs has a much nicer module-based plugin system than the one v8-juice provides. vu8 has a much nicer class/module-binding system as well.

License

The code base contains code of several licenses:

  • Most of the core library uses the same license as v8: the New BSD license
  • Some of the core code is Public Domain and much of the code adopted from other source trees is Public Domain. Most future code will likely be Public Domain.
  • Plugins, which often use external libraries, may have arbitrary licenses. They are stored in their own source tree (outside of the main v8-juice sources) to avoid potential license contamination from viral licenses.

The whole library would be Public Domain, but Google Code neither recognizes nor allows Public Domain as a project license. Since v8-juice is an extension of v8, which has a BSD license, it is assumed that a BSD license will be acceptable to potential v8-juice users who have accepted v8's licensing terms.

Users needing other license conditions may request them from the code author(s). Tip: for any v8-juice code where i'm the attributed author (Stephan Beal), you've got blanket permission to do whatever the hell you want to with your copy of the code (including re-licensing it). The exception to that is any code which necessarily adopts viral licensing conditions from 3rd-party libraries it uses, such as the GNU Readline plugin.

Contributors

v8-juice's primary author is Stephan Beal (http://wanderinghorse.net/home/stephan/).

Anton Yemelyanov works on the Windows port, and has introduced several portability fixes.

v8-juice user Rob Tsuk contributed insightful suggestions which lead to new features and improvements in older features. e.g. the ClassWrap API was developed in response to his input.

Coen Campman provided the support needed to get V8Convert working on MSVC 2010.

Mailing List

http://groups.google.com/group/v8-juice-js-dev

Project Stats

Provided by Ohloh.net:

Those stats would appear, however, to be largely skewed. As of now (April 2009), the tree (including plugins) contains code which took less than a year of part-time work, and not the 9 years Ohloh calculates. (Maybe it's because i use the terribly efficient XEmacs as my editor.)

Comment by motiur.r...@gmail.com, Dec 31, 2009

Where is the V8 code , just give me the url ; don't say that someelse is hosting it.

Comment by project member sgbeal@gmail.com, Jan 1, 2010

v8 is a separate project (hosted by someone else) and the link to it is in the very first sentence of this page.


Sign in to add a comment
Powered by Google Project Hosting