From: netto <geraldone...@gmail.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master
lua-hello: add Lua example
this patch has 3 files:
- hello.lua (our example)
- module.py (add Lua as dependency for this package and pass hello.lua as
parameter)
- usr.manifest (defines the final path of hello.lua)
Signed-off-by: netto <geraldone...@gmail.com>
Message-Id: <1520653140-2062-3-git-send-email-geraldone...@gmail.com>
---
diff --git a/lua-hello/hello.lua b/lua-hello/hello.lua
--- a/lua-hello/hello.lua
+++ b/lua-hello/hello.lua
@@ -0,0 +1,4 @@
+-- prints Hello World
+print("Hello World")
+-- exit from Lua interpreter (will shutdown OSv)
+os.exit()
diff --git a/lua-hello/module.py b/lua-hello/module.py
--- a/lua-hello/module.py
+++ b/lua-hello/module.py
@@ -0,0 +1,3 @@
+from osv.modules import api
+api.require("lua")
+default = api.run("/usr/lib/liblua.so /usr/lib/hello.lua")
diff --git a/lua-hello/usr.manifest b/lua-hello/usr.manifest
--- a/lua-hello/usr.manifest
+++ b/lua-hello/usr.manifest
@@ -0,0 +1 @@
+/usr/lib/hello.lua: ${MODULE_DIR}/hello.lua
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.