Skip to content

glassesneo/spellua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spellua

spellua is a high level LuaJIT bindings for Nim.

Installation

nimble install spellua

Usage

import
  std/os,
  spellua

let driver = LuaDriver.new()

driver.loadFile(getAppDir()/"sample.lua")

# Get lua variables
echo driver.getString(Name)

echo driver.getInteger(Size)

echo driver.getBoolean(Enable)

# Bind lua variables
driver.bindString(V1)

echo V1

driver.close()
-- sample.lua
Name = [[=================
Hello World
=================]]

Size = 640

Enable = true

V1 = "bound variable"

License

spellua is licensed under the MIT license. See COPYING for details.