add lua support
This commit is contained in:
parent
9d04f1929d
commit
c2904a8e14
|
@ -77,6 +77,7 @@ func Execute(res http.ResponseWriter, req *http.Request) {
|
|||
"java",
|
||||
"julia", "jl",
|
||||
"kotlin",
|
||||
"lua",
|
||||
"nasm", "asm",
|
||||
"node", "javascript", "js",
|
||||
"perl", "pl",
|
||||
|
|
|
@ -75,6 +75,9 @@ case "$lang" in
|
|||
"kotlin")
|
||||
bin=kotlin
|
||||
;;
|
||||
"lua")
|
||||
bin=lua
|
||||
;;
|
||||
"nasm" | "asm")
|
||||
bin=nasm
|
||||
;;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
cd /tmp/$2
|
||||
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 lua code.code"
|
|
@ -33,6 +33,9 @@ echo '---'
|
|||
echo 'kotlin'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "kotlinc -version 2>&1 | grep kotlin"
|
||||
echo "---"
|
||||
echo 'lua'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "lua -v"
|
||||
echo "---"
|
||||
echo 'nasm'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "nasm -version"
|
||||
echo '---'
|
||||
|
|
11
readme.md
11
readme.md
|
@ -207,6 +207,17 @@ make
|
|||
echo 'export PATH=$PATH:/opt/emacs/emacs-26.3/src' >> /opt/.profile
|
||||
source /opt/.profile
|
||||
|
||||
# install lua
|
||||
# final binary: /opt/lua/lua54/src/lua
|
||||
# get version: /opt/lua/lua54/src/lua -v
|
||||
cd /opt && mkdir lua && cd lua
|
||||
wget https://sourceforge.net/projects/luabinaries/files/5.4.0/Docs%20and%20Sources/lua-5.4.0_Sources.tar.gz/download
|
||||
tar -xzf download
|
||||
cd lua54
|
||||
make
|
||||
echo 'export PATH=$PATH:/opt/lua/lua54/src' >> /opt/.profile
|
||||
source /opt/.profile
|
||||
|
||||
# create runnable users and apply limits
|
||||
for i in {1..150}; do
|
||||
useradd -M runner$i
|
||||
|
|
Loading…
Reference in New Issue