mirror of
https://github.com/engineer-man/piston.git
synced 2025-09-20 19:00:04 +02:00
piston: add zig support
This commit is contained in:
parent
b0c462d5ee
commit
82f67dd091
7 changed files with 32 additions and 0 deletions
|
@ -132,6 +132,9 @@ case "$lang" in
|
|||
"typescript" | "ts")
|
||||
bin=typescript
|
||||
;;
|
||||
"zig")
|
||||
bin=zig
|
||||
;;
|
||||
*)
|
||||
echo "invalid language"
|
||||
exit
|
||||
|
|
4
lxc/executors/zig
Executable file
4
lxc/executors/zig
Executable file
|
@ -0,0 +1,4 @@
|
|||
cd /tmp/$2
|
||||
cp code.code main.zig
|
||||
timeout -s KILL 10 zig build-exe main.zig
|
||||
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./main"
|
|
@ -53,3 +53,5 @@ echo 'testing python3'
|
|||
../execute python3 test3.py
|
||||
echo 'testing paradoc'
|
||||
../execute python3 test_paradoc.py
|
||||
echo 'testing zig'
|
||||
../execute zig test.zig
|
||||
|
|
6
lxc/tests/test.zig
Normal file
6
lxc/tests/test.zig
Normal file
|
@ -0,0 +1,6 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn main() !void {
|
||||
const stdout = std.io.getStdOut().writer();
|
||||
try stdout.print("good\n", .{});
|
||||
}
|
|
@ -112,3 +112,7 @@ echo '---'
|
|||
echo 'typescript'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "tsc --version"
|
||||
echo '---'
|
||||
|
||||
echo 'zig'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "zig version"
|
||||
echo '---'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue