lux-cli-dist-bin(1)

πŸ“¦ version 0.48.0, in nixpkgs unstable

πŸ¦‹ lux-cli-dist-bin(1) β€” General Commands Manual, but make it cute πŸ¦‹

okay so this whole page is the lux-cli-dist-bin(1) manual from the General Commands Manual, and we're about to compile a Lux project into a single binary with zero boring vibes. Let's go πŸ’…


🌸 NAME 🌸

Compile a Lux project β€” including its dependencies β€” into a single binary that runs on systems where Lua isn't installed. Periodt. 🫢

Projects with native Lua modules are not single binaries: those modules get copied as shared libraries next to the output binary, and must be shipped alongside it. Same energy as flat-archive: dependency conflicts are not supported/handled. 🚨

The entrypoint lives in the lux.toml's [run] field, like:

[run]
args = ["src/main.lua"]

✨ SYNOPSIS ✨

lux-cli dist bin [-o|--output] [-p|--package] [--server]
[--extra-servers] [--output-format] [--namespace] [--lua-dir]
[--lua-version] [--tree] [--cache-dir] [--data-dir] [--variables]
[--profile] [--verbose] [--no-progress] [--no-prompt] [--preset]
[--nvim] [--no-tfa] [--timeout] [--max-jobs] [--no-luarc]
[--no-wrap-bin] [--user-agent] [-h|--help]

πŸ¦‹ DESCRIPTION πŸ¦‹

Compile a Lux project β€” including its dependencies β€” into a single binary that runs on systems where Lua isn't installed. Yep, we're saying it again because it's iconic. πŸ‘‘

Projects with native Lua modules are not single binaries: the modules are copied as shared libraries next to the output binary, and must be shipped alongside it. As with flat-archive, dependency conflicts are not supported/handled. No cap, that's the caveat. πŸ’€

The entrypoint is specified via the lux.toml's [run] field, e.g.:

[run]
args = ["src/main.lua"]

πŸ‘‘ OPTIONS πŸ‘‘

okay bestie, here is every single flag. no skips, no summarizing, we're eating the whole menu πŸ“

  • -o, --output <OUTPUT> β€” Output path for the compiled binary. Defaults to <package>[.exe] in the current directory. πŸ’–
  • -p, --package <PACKAGE> β€” Package to compile. Prioritises local projects if in a workspace. If not set, lux will attempt to compile the current project. Must be set in multi-project workspaces. πŸŽ€
  • --server <server> β€” Fetch rocks/rockspecs from this server (takes priority over config file). 🌐
  • --extra-servers <extra-server> β€” Fetch rocks/rockspecs from these servers in addition to the main server (overrides any entries in the config file). ✨
  • --output-format <OUTPUT_FORMAT> [default: text] β€” Possible values:
    • json
    • text
  • --namespace <namespace> β€” Specify the luarocks server namespace to use. πŸ¦‹
  • --lua-dir <prefix> β€” Specify the directory in which to install Lua if not found. πŸ’œ
  • --lua-version <ver> β€” Which Lua installation to use. Valid versions are: '5.1', '5.2', '5.3', '5.4', '5.5', 'jit' and 'jit52'. If not set, Lux will attempt to detect the Lua version: from the current project, if it has an exact Lua version requirement; from the Lua installation that is available on the PATH. πŸ”₯
  • --tree <tree> β€” Which tree to operate on. In a workspace, this can be used to specify a detached workspace tree. 🌈
  • --cache-dir <cache-dir> β€” Specifies the cache directory, e.g. for luarocks manifests. πŸ—‚οΈ
  • --data-dir <data-dir> β€” Specifies the data directory, in which the default user install tree resides (e.g. ~/.local/share/lux). 🏠
  • --variables <variable> β€” Override config variables. Example: lx -v "LUA=/path/to/lua" ... 🧚
  • --profile <profile> β€” The build profile to use when compiling packages. Default: release. Possible values:
    • release
    • dev
  • --verbose β€” Display verbose output of commands executed, enabling DEBUG logs. To enable TRACE logs, set RUST_LOG=trace. πŸ“’
  • --no-progress β€” Don't print any progress bars or spinners. πŸ™ˆ
  • --no-prompt <NO_PROMPT> β€” Skip prompts, selecting the default option. Prompting is enabled by default in terminal/TTY environments. Possible values:
    • true
    • false
  • --preset <preset> β€” Configure Lux for a specific environment. Valid presets are: 'nvim'. Possible values:
    • nvim: Configure Lux for Neovim plugins
  • --nvim β€” DEPRECATED: Configure lux for installing Neovim packages. Use --preset nvim instead. πŸ’…
  • --no-tfa β€” Disable prompts for two-factor authentication (2FA) codes. It is strongly recommended to enable 2FA instead see (https://luarocks.org/settings/two-factor-auth). πŸ”
bestie, the 2FA rec is real β€” enable it if you can, okay? 🫢
  • --timeout <seconds> β€” Timeout on network operations, in seconds. 0 means no timeout (wait forever). Default is 30. ⏳
  • --max-jobs <MAX_JOBS> β€” Maximum buffer size for parallel jobs, such as downloading rockspecs and installing rocks. 0 means no limit. Default is 0. ⚑
  • --no-luarc β€” Do not generate or update a .luarc.json file when building a project. 🚫
  • --no-wrap-bin β€” Do not wrap Lua bin scripts. πŸŽ€
  • --user-agent <USER_AGENT> β€” The user agent to set when making web requests. Default is "lux/<version>". 🌸
  • -h, --help β€” Print help (see a summary with '-h'). 🫢

okay that's the whole page, bestie β€” source/version bin, manual lux-cli-dist-bin(1) β€” periodt πŸ’…βœ¨

πŸ“¦ where this page comes from