LuaJIT plugin for asdf version manager
This plugin also installs luarocks along with luaJIT. It is not currently an optional install. If you need it to be, please let me know. You specify both versions in the asdf version. For example, if you want luaJIT 2.0.5 with luarocks 2.4.4, your asdf version will be specified as 2.0.5--2.4.4.
- You will need a compiler.
- Hit the ok button and it will install. If it already has it, then you are good.
sudo apt-get install linux-headers-$(uname -r) build-essential
- On Ubuntu, you will need libreadline
sudo apt-get install libreadline-dev
asdf plugin-add luaJIT https://github.com/smashedtoatoms/asdf-luaJIT.git
Check asdf readme for instructions on how to install & manage versions of LuaJIT.
When installing LuaJIT using
asdf install, you can pass custom configure options with the following env vars:
LUAJIT_CONFIGURE_OPTIONS- use only your configure options
LUAJIT_EXTRA_CONFIGURE_OPTIONS- append these configure options along with ones that this plugin already uses
LUAROCKS_CONFIGURE_OPTIONS- use only your configure options
LUAROCKS_EXTRA_CONFIGURE_OPTIONS- append these configure options along with ones that this plugin already uses
How to use (easier version)
- Create your .tool-versions file in the project that needs luaJIT and add
luaJIT 2.0.5--2.4.4or whatever version that you want. Note: the version is luaJITVersion--luarocksVersion
- Add a
LUAROCKS_EXTRA_CONFIGURE_OPTIONSenvironment variables with config options if you want. You probably don't want/need to do this.
- Once it is done, run
luajit. If it says something about having no version set, make sure you set
luaJIT luaJITVersion--luarocksVersionin your ~/.tool-versions file.