Skip to content

Instantly share code, notes, and snippets.

@jdonaldson
Last active October 4, 2018 19:23
Show Gist options
  • Save jdonaldson/bb21bfea7befa05b2c17db34cfe693be to your computer and use it in GitHub Desktop.
Save jdonaldson/bb21bfea7befa05b2c17db34cfe693be to your computer and use it in GitHub Desktop.
-main Main
-lua out.lua
-D lua-jit
-cmd lua out.lua
import lua.jit.FFIBuilder;
import lua.Ffi;
class Main {
static function main() {
var k= 'hi';
trace(k.length + " is the value for k.length");
SomeFfi.printf("foo %s", "hi");
SomeFfi.puts("fabaoijaowief\n");
}
}
extern class SomeFfi implements FfiBuilder {
static function printf(fmt : String, arg : String) : Int;
static function puts(str : String) : Int;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment