xref: /freebsd/libexec/flua/flua.1 (revision cbe50f7c20cf0ca484d29cf345864a18c29850e7)
155028977SEd Maste.\"
255028977SEd Maste.\" SPDX-License-Identifier: BSD-2-Clause
355028977SEd Maste.\"
455028977SEd Maste.\" Copyright (c) 2025 The FreeBSD Foundation
555028977SEd Maste.\"
655028977SEd Maste.\" Redistribution and use in source and binary forms, with or without
755028977SEd Maste.\" modification, are permitted provided that the following conditions
855028977SEd Maste.\" are met:
955028977SEd Maste.\"
1055028977SEd Maste.\" 1. Redistributions of source code must retain the above copyright
1155028977SEd Maste.\"    notice, this list of conditions and the following disclaimer.
1255028977SEd Maste.\" 2. Redistributions in binary form must reproduce the above copyright
1355028977SEd Maste.\"    notice, this list of conditions and the following disclaimer in the
1455028977SEd Maste.\"    documentation and/or other materials provided with the distribution.
1555028977SEd Maste.\"
1655028977SEd Maste.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1755028977SEd Maste.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1855028977SEd Maste.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1955028977SEd Maste.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2055028977SEd Maste.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2155028977SEd Maste.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2255028977SEd Maste.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2355028977SEd Maste.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2455028977SEd Maste.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2555028977SEd Maste.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2655028977SEd Maste.\" SUCH DAMAGE.
2755028977SEd Maste.\"
28*cbe50f7cSEd Maste.Dd April 28, 2025
2955028977SEd Maste.Dt FLUA 1
3055028977SEd Maste.Os
3155028977SEd Maste.Sh NAME
3255028977SEd Maste.Nm flua
3355028977SEd Maste.Nd Lua interpreter for the FreeBSD base system
3455028977SEd Maste.Sh SYNOPSIS
3555028977SEd Maste.Nm flua
3655028977SEd Maste.Op Fl EWiv
3755028977SEd Maste.Op Fl e Ar string
3855028977SEd Maste.Op Fl l Ar module
3955028977SEd Maste.Op Fl l Ar g=module
4055028977SEd Maste.Op Ar script Op Ar args
4155028977SEd Maste.Op Fl -
4255028977SEd Maste.Op Fl
4355028977SEd Maste.Sh DESCRIPTION
4455028977SEd Maste.Nm
4555028977SEd Masteis a minimal Lua interpreter integrated into the FreeBSD base system.
4655028977SEd MasteIt is derived from Lua 5.4 with modifications to suit the needs of
4755028977SEd Maste.Fx
4855028977SEd Mastebuild infrastructure and system tooling.
4955028977SEd Maste.Nm
5055028977SEd Masteis intended for internal use within the base system and is
5155028977SEd Maste.Em not
5255028977SEd Mastedesigned for general-purpose scripting or use by third-party applications.
5355028977SEd Maste.Pp
5455028977SEd MasteUnlike full Lua installations provided by the Ports Collection,
5555028977SEd Maste.Nm
5655028977SEd Mastehas a reduced feature set and is limited to meeting the requirements of
5755028977SEd Mastebase system environments such as the bootloader.
5855028977SEd Maste.Sh USAGE
5955028977SEd Maste.Nm
6055028977SEd Masteis typically invoked internally by FreeBSD base system tools and build scripts.
6155028977SEd MasteWhile it accepts Lua source files and arguments in a standard fashion, its
6255028977SEd Mastelimited environment and module support make it unsuitable for general scripting
6355028977SEd Masteuse.
6455028977SEd Maste.Sh INCLUDED MODULES
6555028977SEd Maste.Nm
6655028977SEd Masteincludes a subset of functionality from a small number of standard Lua modules
6755028977SEd Masteas well as bespoke modules necessary for the base system:
6855028977SEd Maste.Bl -bullet
6955028977SEd Maste.It
7055028977SEd Mastelfs (LuaFileSystem) – file attribute and directory manipulation
7155028977SEd Maste.It
7255028977SEd Mastelposix - basic POSIX system calls
7355028977SEd Maste.It
7455028977SEd Maste.Xr freebsd.kenv 3lua
7555028977SEd Maste.It
7655028977SEd Maste.Xr freebsd.sys.linker 3lua
7755028977SEd Maste.It
7855028977SEd Maste.Xr hash 3lua
7955028977SEd Maste.It
8055028977SEd Maste.Xr jail 3lua
8155028977SEd Maste.El
8255028977SEd Maste.Sh NOTES
8355028977SEd Maste.Nm
8455028977SEd Masteshould not be used as a replacement for
8555028977SEd Maste.Xr lua 1
8655028977SEd Mastefrom the Ports Collection (e.g.,
8755028977SEd Maste.Pa lang/lua54 )
8855028977SEd Masteas it may be modified or updated to a newer Lua version in the future without
8955028977SEd Masteretaining backwards compatibility.
9055028977SEd Maste.Sh SEE ALSO
9155028977SEd Maste.Xr freebsd.kenv 3lua ,
9255028977SEd Maste.Xr freebsd.sys.linker 3lua ,
9355028977SEd Maste.Xr hash 3lua ,
94*cbe50f7cSEd Maste.Xr jail 3lua ,
95*cbe50f7cSEd Maste.Xr style.lua 9
9655028977SEd Maste.Sh HISTORY
9755028977SEd Maste.Nm
9855028977SEd Mastefirst appeared in
9955028977SEd Maste.Fx 14.0 .
100