R/luajr-package.R

Defines functions inlineCxxPlugin

## usethis namespace: start
#' @useDynLib luajr, .registration = TRUE
## usethis namespace: end
NULL

# To instruct inline/Rcpp packages how to depend on luajr
inlineCxxPlugin = function(...)
{
    Rcpp::Rcpp.plugin.maker(
        include.after = "#include <luajr.h>\n#include <luajr_funcdef.h>",
        package = "luajr")(...)
}

#' luajr: LuaJIT Scripting
#'
#' 'luajr' provides an interface to [LuaJIT](https://luajit.org), a
#' just-in-time compiler for the [Lua scripting language](https://www.lua.org).
#' It allows users to run Lua code from R.
#'
#' @section The R API:
#' * [lua()]: run Lua code
#' * [lua_func()]: make a Lua function callable from R
#' * [lua_shell()]: run an interactive Lua shell
#' * [lua_open()]: create a new Lua state
#' * [lua_reset()]: reset the default Lua state
#' * [lua_parallel()]: run Lua code in parallel
#'
#' @section Further reading:
#' For an introduction to 'luajr', see `vignette("luajr")`
"_PACKAGE"

Try the luajr package in your browser

Any scripts or data that you put into this service are public.

luajr documentation built on June 8, 2025, 10:40 a.m.