Skip to content

Instantly share code, notes, and snippets.

@malkia
Created February 3, 2012 05:28
Show Gist options
  • Save malkia/1728313 to your computer and use it in GitHub Desktop.
Save malkia/1728313 to your computer and use it in GitHub Desktop.
bo faq
Q1: What is BO?
A1: BO is a luajit distribution targeting desktop computers and mobile devices.
Q2: Why BO?
A2: With BO you can edit and run lua code straight on the target.
Q3: Batteries included?
A3: Yes. BO comes with ffi bindings for several popular libraries and frameworks.
Q4: What is ffi?
A4: FFI stands for foreign-function-interface, and it's one of the luajit methods for calling C/C++ functions
Q5: Why ffi?
A5: Luajit's FFI bindings are just normal "C" declarations, declared right into the lua code. This allows for lua code to call any "C" function, without the need to compile something externally. It's similar to python's types, lua's alien (and ffi now), common lisp cffi/uffi, etc.
Q6: C/C++ code?
A6: BO comes with scripts that would help you compile your C/C++ code for all supported targets, and create for you dynamic and static libraries.
Q7: Why dynamic and static?
A7: Luajit's ffi works only with dynamic libraries, but through some tweaking BO would allow (in future) to link a whole executable, or whole dynamic library where everything is one place. The first case (application) is the only viable solution for publishing on the iOS, the second one is more of a safety - for example a plugin writer for Adobe, Autodesk, GIMP or other product might be more interested in shipping one .DLL, .so or .dylib rather than the whole BO distribution
Q8: Licensing?
A8: Same as luajit (MIT). Some of the libraries included are with LGPL, GPL, etc. Make sure you are not violating their license. For example if GPL library is used, and your final product is one .DLL, or one executable then you should make the source code available to end-users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment