Installing Luna Framework

Simple guide for installing the Luna server library and Lunac client library in your project

Downloading the Library

1

Visit the GitHub repository

The Luna library is hosted on GitHub. You need to download the luna and lunac folders from the repository.

Open Repository
2

Download the library

You can download the library using one of these methods:

Option 1: Via Git

$ git clone https://github.com/Max-Dil/luna.git

Option 2: Download ZIP archive

Click the "Code" button on GitHub, then "Download ZIP" and extract the archive.

3

Locate the required folders

After downloading, find these folders in the repository:

luna
init.lua
... and other files
lunac
init.lua
... and other files

Project Integration

1

Copy folders to your project

Move the luna and lunac folders to your project root or to a libraries folder.

Recommended project structure:

your_project
luna
lunac
src
main.lua
2

Include libraries in your code

To use the libraries in your project, require them:

-- Include server part
local luna = require("luna")

-- Include client part
local lunac = require("lunac")

If you placed libraries in a subfolder (e.g., libs/luna), use:

local luna = require("libs.luna")
3

Test the setup

Create a simple application to test the library:

local luna = require("luna")

local app = luna.new_app({
    name = "Test Server",
    max_ip_connected = 20,
    host = "127.0.0.1",
    port = 8080
})

print("Server running on port 8080")

Requirements

1

Lua Version

Luna Framework works with these Lua versions:

  • Lua 5.1
  • LuaJIT (recommended for better performance)
2

Dependencies

Luna Framework requires:

  • LuaSocket (usually included in standard Lua libraries)

What's Next?

Now that you've installed Luna Framework, you can:

Read Documentation