Skip to content

Commit

Permalink
Merge pull request #4 from bacn/feature/add-nim
Browse files Browse the repository at this point in the history
feat: add nim
  • Loading branch information
AnnikaV9 authored Nov 2, 2024
2 parents 22aa635 + fc6f337 commit f8492cd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Supported languages:
Clojure 18
x86 Assembly 19
Zig 20
Nim 21


Please set this up on a SELinux-enabled system.
Expand Down
1 change: 1 addition & 0 deletions entry/nim.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nim compile --nimcache:/tmp --usenimcache -w:off --hints:off --passC:"-w" --run source.nim
1 change: 1 addition & 0 deletions routes/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func getLanguageConfig() map[string]map[string]string {
"18": {"entry": "clojure", "ext": "clj", "image": "whipcode-clojure"},
"19": {"entry": "nasm", "ext": "asm", "image": "whipcode-nasm"},
"20": {"entry": "zig", "ext": "zig", "image": "whipcode-zig"},
"21": {"entry": "nim", "ext": "nim", "image": "whipcode-nim"},
}
}

Expand Down
1 change: 1 addition & 0 deletions scripts/images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ declare -A langs=(
[clojure]='clojure'
[nasm]='nasm binutils'
[zig]='zig'
[nim]='nim gcc'
)

HEADER="FROM docker.io/alpine:latest"
Expand Down
1 change: 1 addition & 0 deletions scripts/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ declare -A langs=(
[18]='(println "Success!")'
[19]='section .text \nglobal _start \n_start:\n mov edx, len \n mov ecx, msg \n mov ebx, 1\n mov eax, 4\n int 0x80\n mov eax, 1\n int 0x80\nsection .data \n msg db "Success!", 0xa\n len equ $ -msg\n'
[20]='const std = @import("std");pub fn main() !void { std.io.getStdOut().writeAll("Success!") catch unreachable; }'
[21]='echo "Success!"'
)

for i in "${!langs[@]}"; do
Expand Down

0 comments on commit f8492cd

Please sign in to comment.