Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matsumotory/mruby-on-lua
mruby on Lua.
https://github.com/matsumotory/mruby-on-lua
Last synced: about 2 months ago
JSON representation
mruby on Lua.
- Host: GitHub
- URL: https://github.com/matsumotory/mruby-on-lua
- Owner: matsumotory
- Created: 2012-06-02T16:12:27.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-08-13T11:02:46.000Z (over 12 years ago)
- Last Synced: 2024-10-18T18:23:50.263Z (3 months ago)
- Language: C
- Size: 131 KB
- Stars: 11
- Watchers: 6
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
* Install
make
* Example
```lua
require "mruby"
mruby.run([[
def tak(x, y, z)
if y >= x
z
else
tak(tak(x - 1, y, z),tak(y - 1, z, x),tak(z - 1, x, y))
end
end
print tak(20, 12, 7)
]])
```* Test
```lua
require "mruby"
file = "./test.mrb"
print(">> mruby file run ./test.mrb")
mruby.run_file(file)
print(">> mruby code run")
mruby.run("puts 'mruby code run on Lua!!'")
```* Run
lua sample.lua
lua mruby_on.lua>> mruby file run ./test.mrb
mruby file run on Lua!!
>> mruby code run
mruby code run on Lua!!