Skip to content

hyuni/kroll

 
 

Repository files navigation

Kroll is the pyrometallurgical industrial process used to produce titanium. 
It's a microkernel.

 _              _ _ 
| | ___ __ ___ | | |
| |/ / '__/ _ \| | |
|   <| | | (_) | | |
|_|\_\_|  \___/|_|_|


Kroll is a compact microkernel written in C++ for running pluggable
modules. Kroll supports a cross-language, cross-platform "binding"
and invocation framework which supports mixing and matching 
code within the Kroll kernel. Yes, that means you can pass a 
Javascript object to a Python function and stuff like that.  It's 
just that bad ass ... admit it.

Currently, Kroll supports the following languages:

- C/C++
- Python
- Ruby
- PHP
- JavaScript

However, any C/C++ exposed language which supports embedding most likely
can be supported with not much effort. These languages are on the 
target list to be added soon:

- Lua  (already in progress)
- Falcon (interest from Falcon community indicated)
- C# (maybe via Mono)
- Java 

The Module API
--------------

The Module API is rather simple but powerful.  You can write modules
in C++ or even in the supported languages like Python.  The module
can really do anything it wants once it's loaded.

The Binding API
---------------

The Module communicates to other modules through "binding". Binding
is the process of either adding values (primitive, objects, functions etc)
to the Kroll runtime or retrieving them.  There are also a small number of 
other utility functions like logging etc that are exposed by the "API module".

The binding implementation for each language knows how to box and unbox
values back and forth from the Kroll runtime and the native language
runtime. This is the key part of the magic of Kroll.

Once bound, you can invoke a function from Ruby which might take a Python 
function as a reference and return a Javascript object.

Kroll
-----

Kroll itself is the microkernel and set of base modules. As a standalone,
it's really not that useful (yet).  The power of Kroll is when it's used
by another application to expose higher level functionality.

Currently, Kroll is the core of the Titanium product.  In this case,
Titanium provides a set of additional modules on top of the base modules
such as the windowing environment.  <http://www.appcelerator.com>



Build
-----

Here are some build specific notes for each platform.

Win32:
======

You will need Visual Studio 2005 + Service Pack 1 for the build to work.

OSX:
====

You will need universal version of installed libraries to build.

You can get the universal versions by running:

> sudo port deactivate libxml2
> sudo port deactivate libiconv
> sudo port deactivate zlib

This should deactivate and then you can run:

> sudo port install zlib +universal
> sudo port install libiconv +universal
> sudo port install libxml2 +universal

This will install the universal versions of these libraries.

Linux
=====

You'll need to base libraries to build.  For unbuntu,

sudo apt-get install the following:

> build-essential 
> ruby 
> rubygems 
> libzip-ruby 
> scons 
> libxml2-dev 
> libgtk2.0-dev 
> python-dev 
> ruby-dev

You'll need git if you planning on committing:

sudo apt-get install git-core


-------------
 Legal Stuff
-------------

Copyright (C) 2008-2009 by Appcelerator, Inc. All Rights Reserved.
For more information, please visit <http://license.appcelerator.org>.
Appcelerator, Titanium and logos are trademark of Appcelerator, Inc.

Please see the file named LICENSE for the full license.

Packages

No packages published

Languages

  • C++ 90.1%
  • Objective-C++ 4.7%
  • Python 2.8%
  • C 1.2%
  • Objective-C 1.2%