diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -26,13 +26,21 @@ So MoonPlus is a new code base for pushing the language to go forward and being | |||
26 | 26 | ||
27 | * **Lua Module** | 27 | * **Lua Module** |
28 | 28 | ||
29 | Install [luarocks](https://luarocks.org), a package manager for Lua modules. Then install it as a Lua module. | 29 |   Build `moonp.so` file with |
30 | |||
31 | ```sh | ||
32 | > make shared LUAI=/usr/local/include/lua LUAL=/usr/local/lib/lua | ||
33 | ``` | ||
34 | |||
35 |   Then get the binary file from path `bin/shared/moonp.so`. | ||
36 | |||
37 |   Or you can install [luarocks](https://luarocks.org), a package manager for Lua modules. Then install it as a Lua module with | ||
30 | 38 | ||
31 | ```sh | 39 | ```sh |
32 | > luarocks install moonplus | 40 | > luarocks install moonplus |
33 | ``` | 41 | ``` |
34 | 42 | ||
35 |   Require the module in Lua: | 43 |   Then require the module in Lua: |
36 | 44 | ||
37 | ```Lua | 45 | ```Lua |
38 | require("moonp")("main") -- require `main.moon` | 46 | require("moonp")("main") -- require `main.moon` |
@@ -54,7 +62,7 @@ f! | |||
54 | 62 | ||
55 | * **Binary Tool** | 63 | * **Binary Tool** |
56 | 64 | ||
57 | Clone this repo, then build and install executable with: | 65 |   Clone this repo, then build and install executable with: |
58 | 66 | ||
59 | ```sh | 67 | ```sh |
60 | > make install | 68 | > make install |