luarocks / luarocks/luarocks

[RFC] static build with LuaRocks 3.0

Open
#262 17 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Lua
Stars
3.7k
Forks
479
PR merge metrics
No merged PRs in 30d

Description

currently, Luarocks build/install shared libraries, for example on linux

```
luarocks install luafilesystem
```

build `lfs.so`, and install it in `/usr/local/lib`

I want that

```
luarocks install --static luafilesystem
```

build `lfs.a` and install it in `/usr/local/lib`
and install `lfs.h` in `/usr/local/inc`

The installation of include files request a new field in the rockspec.
The option `--static` has not effect on pure Lua modules.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the `luarocks install` command and the build/install handling for native modules, then inspect how rockspec fields are defined and consumed. The requested behavior is a `--static` installation that produces and installs `lfs.a` and `lfs.h`, while leaving pure Lua modules unchanged; the include-file rockspec field also needs a defined format.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
build-system, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.