aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs/README.LuaSL
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-04-22 14:51:57 +1000
committerDavid Walter Seikel2014-04-22 14:51:57 +1000
commit29c25cb913fde0a8320bca9b9ea2cc82fbe2ec94 (patch)
treebf30c64b37e6d8e928d91b1b30f1073f036cad98 /docs/README.LuaSL
parentMove LuaSL source up one directory. (diff)
downloadSledjHamr-29c25cb913fde0a8320bca9b9ea2cc82fbe2ec94.zip
SledjHamr-29c25cb913fde0a8320bca9b9ea2cc82fbe2ec94.tar.gz
SledjHamr-29c25cb913fde0a8320bca9b9ea2cc82fbe2ec94.tar.bz2
SledjHamr-29c25cb913fde0a8320bca9b9ea2cc82fbe2ec94.tar.xz
Move most of the README's and other docs into the new docs directory.
Diffstat (limited to 'docs/README.LuaSL')
-rw-r--r--docs/README.LuaSL100
1 files changed, 100 insertions, 0 deletions
diff --git a/docs/README.LuaSL b/docs/README.LuaSL
new file mode 100644
index 0000000..1444948
--- /dev/null
+++ b/docs/README.LuaSL
@@ -0,0 +1,100 @@
1Refer to - http://www.infinitegrid.org/drupal/content/LuaSL_New_scripting_engine
2
3LuaSL is a Lua based LSL scripting engine that will aim for LSL
4compatability first, then adding Lua extensions. It aims to replace the
5woeful XEngine from OpenSim, and at a later stage, be the basis for a
6client side scripting engine.
7
8To compile this, you will need Enlightenment Foundation Libraries (EFL)
9installed in either /opt/e17 or /usr. These are typical places it get's
10installed in. You will also need flex. The rest of the dependencies
11are in the ../libraries directory.
12
13
14Design.
15-------
16
17The basic design will be made up as I go along, but so far I have this -
18
19A parser parses an LSL script, validating it and reporting errors.
20
21A translator takes the result of the parse, and converts it into Lua
22source. Each LSL script becomes a Lua state. LSL states are handled as
23Lua tables, with each LSL state function being a table function in a
24common metatable. LL and OS functions are likely to be C or Lua
25functions. Careful testing should be done with LuaJIT FFI, sandboxing,
26and performance testing.
27
28The Lua source is compiled by the Lua compiler.
29
30LuaJIT is used as the Lua compiler, library, and runtime.
31
32Luaproc is used to start up operating system threads and hand Lua states
33between them. Luaproc messaging is also being used, but might need to
34change to edje messaging. Note - luaproc has been extensively rewritten
35for this project, mostly converting it to use EFL. That rewrite
36substantially shrunk the source code. More might be rewritten in
37future.
38
39THIS IS WHERE WE ARE RIGHT NOW.
40
41Nails will be used to pump commands in and out of the LuaSL system.
42Incoming commands invoke LSL events via the LuaSL state metatable. LL
43and OS functions that impact the world will be converted to nails
44commands sent to the command pump.
45
46Initialy, since this is the first thing being written, a nails command
47pump client needs to be installed into OpenSim's C# stuff. Though it
48might be possible to talk directly to ROBUST instead. Think I'll try
49the ROBUST route, see how far I can get. That's the general principle
50applying in all of this - try to avoid C# and see how for we can get.
51lol
52
53On the other hand, might be better to leverage the existing C#
54implementations of LSL functions, just to get things up and running
55quickly. To that end, a protocol involving exchanging snippets of Lua
56over a network socket has been developed, and the next step is to write
57the C# side. sigh
58
59A watchdog thread should be used to make sure no LuaSL script spends
60forever processing any event.
61
62Some form of serialization will need to be created for saving script
63state during shutdowns, passing script state to other threads /
64processes / computers. Aparently Lua is good at this.
65
66There will have to be a MySQL (and maybe SQLite) client in the system,
67so we can talk directly to the local sim database. Esskyuehl may be
68suitable, though it's still in the prototype stage.
69
70Email, HTTP, and XML-RPC might need to be dealt with by us. A ROBUST
71client will be needed to. Azy might be suitable, but it's also in
72prototype.
73
74An object is a file system directory, full of LSL scripts as text files,
75notecards as text files, animations as BVH (or later BVJ) files, etc.
76There will be some sort of metadata in place. This could be created by
77our own OpenSim compatible cache module.
78
79
80Test harness.
81-------------
82
83I'll build a test harness. It will be based on EFL Edje Lua, with
84buttons for triggering LSL events, SL style dialogs, and other goodies.
85
86The initial goal will be to run standard MLP scripts. They have minimal
87interface to the world, and exercise quite a bit of the rest of LSL.
88They are also quite common, and sometimes responsible for a lot of the
89script running load.
90
91Later I should add stock standard OpenCollar scripts from SL. They are
92a bitch to get working under OpenSim, so would be good compatability
93tests.
94
95Various eina logging domains might be used to handle whisper, say, shout,
96etc.
97
98Performance testing will have to be done on 5000 scripts, to see how
99that compares against XEngine.
100