https://github.com/ukoloff/rufus-lua-win
Provides Lua binary on Windows
https://github.com/ukoloff/rufus-lua-win
appveyor lua luadist ruby rufus windows
Last synced: 11 months ago
JSON representation
Provides Lua binary on Windows
- Host: GitHub
- URL: https://github.com/ukoloff/rufus-lua-win
- Owner: ukoloff
- License: mit
- Created: 2014-09-07T07:12:59.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-11-06T22:39:38.000Z (over 4 years ago)
- Last Synced: 2024-04-25T00:55:57.000Z (almost 2 years ago)
- Topics: appveyor, lua, luadist, ruby, rufus, windows
- Language: Ruby
- Size: 1.09 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Rufus::Lua::Win
[](https://ci.appveyor.com/project/ukoloff/rufus-lua-win)
[](http://badge.fury.io/rb/rufus-lua-win)
Provides Lua binary on Windows.
Embedding Lua into Ruby on Windows has two issues:
1. There is no standard binary distributive for Lua
2. Lua way of searching for libraries (rocks) fails
So, this gem embeds binary Lua (from LuaDist)
and patches package.path and package.cpath.
## Installation
You don't need to download, install or compile any Lua distribution.
Just add this line to your application's Gemfile:
gem 'rufus-lua-win'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rufus-lua-win
## Usage
Add two lines to Gemfile (in *that* order):
gem 'rufus-lua-win' if Gem.win_platform?
gem 'rufus-lua'
Rufus::Lua::Win will setup environment variables, so Rufus::Lua could load.
If not using bundler, just:
```ruby
require 'rufus/lua/win' if Gem.win_platform?
require 'rufus/lua'
s=Rufus::Lua::State.new
s.eval "require 'lpeg'"
...
```
## Lua Path
Rufus::Lua::Win overrides standard Lua search paths to point to its own
Lua libraries.
Paths like `./?.lua` or `./?.dll` are excluded, since they are not very useful
in embedded environment.
If you like to `require` your own files inside Rufus::Lua - put them in
separate folder and add it to package.path (or package.cpath).
## Credits
* [Lua](http://www.lua.org/)
* [LuaDist](http://luadist.org/)
* [Rufus::Lua](https://github.com/jmettraux/rufus-lua)
* [AppVeyor](http://www.appveyor.com/)
## See also
* [Rufus::Lua::Moon](https://github.com/ukoloff/rufus-lua-moon) to use MoonScript