diff --git a/.gitmodules b/.gitmodules
index cc5dce7f7..c30e30f9d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -16,3 +16,6 @@
[submodule "project/lib/zlib"]
path = project/lib/zlib
url = https://github.com/native-toolkit/zlib
+[submodule "project/lib/neko"]
+ path = project/lib/neko
+ url = https://github.com/native-toolkit/neko
diff --git a/project/Build.xml b/project/Build.xml
index 38cf8e282..719ce0051 100644
--- a/project/Build.xml
+++ b/project/Build.xml
@@ -8,10 +8,11 @@
-
-
+
+
+
@@ -57,10 +58,14 @@
+
+
+
+
@@ -74,6 +79,7 @@
+
@@ -110,6 +116,10 @@
+
+
+
+
@@ -127,6 +137,10 @@
+
+
+
+
diff --git a/project/include/vm/Neko.h b/project/include/vm/Neko.h
new file mode 100644
index 000000000..7d79b098c
--- /dev/null
+++ b/project/include/vm/Neko.h
@@ -0,0 +1,20 @@
+#ifndef LIME_VM_NEKO_H
+#define LIME_VM_NEKO_H
+
+
+namespace lime {
+
+
+ class Neko {
+
+ public:
+
+ static void Execute (const char *module);
+
+ };
+
+
+}
+
+
+#endif
\ No newline at end of file
diff --git a/project/lib/neko b/project/lib/neko
new file mode 160000
index 000000000..f91ea8873
--- /dev/null
+++ b/project/lib/neko
@@ -0,0 +1 @@
+Subproject commit f91ea8873af7730e669e4bc3406cefe490c5ab3a
diff --git a/project/src/ExternalInterface.cpp b/project/src/ExternalInterface.cpp
index fe0726cd1..5098a8ce4 100644
--- a/project/src/ExternalInterface.cpp
+++ b/project/src/ExternalInterface.cpp
@@ -19,6 +19,7 @@
#include
#include
#include
+#include
namespace lime {
@@ -99,6 +100,16 @@ namespace lime {
}
+ value lime_neko_execute (value module) {
+
+ #ifdef LIME_NEKO
+ Neko::Execute (val_string (module));
+ #endif
+ return alloc_null ();
+
+ }
+
+
value lime_png_decode (value bytes, value imageData) {
ByteArray byteArray (bytes);
@@ -184,6 +195,7 @@ namespace lime {
DEFINE_PRIM (lime_lzma_encode, 1);
DEFINE_PRIM (lime_lzma_decode, 1);
DEFINE_PRIM (lime_mouse_event_manager_register, 2);
+ DEFINE_PRIM (lime_neko_execute, 1);
DEFINE_PRIM (lime_png_decode, 2);
DEFINE_PRIM (lime_renderer_create, 1);
DEFINE_PRIM (lime_renderer_flip, 1);
diff --git a/project/src/vm/Neko.cpp b/project/src/vm/Neko.cpp
new file mode 100644
index 000000000..2cb348d49
--- /dev/null
+++ b/project/src/vm/Neko.cpp
@@ -0,0 +1,70 @@
+#include
+#include
+#include
+
+
+extern "C" { void std_main (); }
+
+
+namespace lime {
+
+
+ static void report( neko_vm *vm, value exc, int isexc ) {
+ int i;
+ buffer b = alloc_buffer(NULL);
+ value st = neko_exc_stack(vm);
+ for(i=0;i