Skip to content

starius/single-dir.lua

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

single-dir.lua

License TravisStatus AppVeyorStatus

Gather all dependencies of Lua module together

Usage

$ lua -l single-dir your-application.lua

Description

All C and Lua modules used by your application are copied to directory "single-dir-out/modules". Directory "single-dir-out/" can be used as a distribution package. To run your Lua application using modules from directory "single-dir-out/modules", set LUA_PATH and LUA_CPATH as follows:

$ export LUA_PATH="modules/?.lua;modules/?/init.lua"
$ export LUA_CPATH="modules/?.so"
$ lua your-application.lua

Replace modules with absolute path to that directory.

Create bash and batch scripts, which do this automatically and run Lua module:

$ make-single-dir your-application.lua

Check directory "single-dir-out/" for bash and batch scripts.

File "single-dir-out/single-file.lua" is composed from all Lua modules (including bytecode). It sets appropriate loaders in package.preload. Require it or load with -l to get all Lua dependencies ready to require.

About

Gather all dependencies of Lua module together

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published