@@ -57,110 +57,98 @@ export const LANG_CONFIGS: Record<
5757> = {
5858 cpp : {
5959 image : 'gcc:latest' ,
60- compile : [ 'g++' , '/app/ solution.cpp' , '-o' , '/app/ solution' ] ,
61- run : [ '/app /solution' ] ,
62- defaultCode : `#include<iostream>
60+ compile : [ 'g++' , 'solution.cpp' , '-o' , 'solution' ] ,
61+ run : [ '. /solution' ] ,
62+ defaultCode : `#include <iostream>
6363using namespace std;
6464
6565int main(){
66-
6766 return 0;
6867}` ,
6968 } ,
70-
7169 python : {
7270 image : 'python:3.9' ,
73- run : [ 'python3' , '/app/ solution.py' ] ,
71+ run : [ 'python3' , 'solution.py' ] ,
7472 defaultCode : '' ,
7573 } ,
76-
7774 javascript : {
7875 image : 'node:18' ,
79- run : [ 'node' , '/app/ solution.js' ] ,
76+ run : [ 'node' , 'solution.js' ] ,
8077 defaultCode : '' ,
8178 } ,
82-
8379 java : {
8480 image : 'openjdk:17' ,
85- compile : [ 'javac' , '/app/ Solution.java' ] ,
86- run : [ 'java' , '-cp' , '/app' , ' Solution'] ,
81+ compile : [ 'javac' , 'Solution.java' ] ,
82+ run : [ 'java' , 'Solution' ] ,
8783 defaultCode : `public class Solution {
8884 public static void main(String[] args) {
85+
8986 }
9087}` ,
9188 } ,
92-
9389 go : {
9490 image : 'golang:1.20' ,
95- compile : [ 'go' , 'build' , '-o' , '/app/ solution' , '/app/ solution.go' ] ,
96- run : [ '/app /solution' ] ,
91+ compile : [ 'go' , 'build' , '-o' , 'solution' , 'solution.go' ] ,
92+ run : [ '. /solution' ] ,
9793 defaultCode : `package main
94+
9895func main() {
96+
9997}` ,
10098 } ,
101-
10299 rust : {
103100 image : 'rust:1.69' ,
104- compile : [ 'rustc' , '/app/ solution.rs' , '-o' , '/app/ solution' ] ,
105- run : [ '/app /solution' ] ,
101+ compile : [ 'rustc' , 'solution.rs' , '-o' , 'solution' ] ,
102+ run : [ '. /solution' ] ,
106103 defaultCode : `fn main() {
104+
107105}` ,
108106 } ,
109-
110107 csharp : {
111108 image : 'mcr.microsoft.com/dotnet/sdk:7.0' ,
112- compile : [ 'csc' , '/app/ Solution.cs' ] ,
113- run : [ 'dotnet' , '/app/ Solution.dll ' ] ,
109+ compile : [ 'csc' , 'Solution.cs' , '-out:Solution.exe '] ,
110+ run : [ 'dotnet' , 'Solution.exe ' ] ,
114111 } ,
115-
116112 ruby : {
117113 image : 'ruby:3.2' ,
118- run : [ 'ruby' , '/app/ solution.rb' ] ,
114+ run : [ 'ruby' , 'solution.rb' ] ,
119115 } ,
120-
121116 swift : {
122117 image : 'swift:5.8' ,
123- compile : [ 'swiftc' , '/app/ solution.swift' , '-o' , '/app/ solution' ] ,
124- run : [ '/app /solution' ] ,
118+ compile : [ 'swiftc' , 'solution.swift' , '-o' , 'solution' ] ,
119+ run : [ '. /solution' ] ,
125120 } ,
126-
127121 php : {
128122 image : 'php:8.2' ,
129- run : [ 'php' , '/app/ solution.php' ] ,
123+ run : [ 'php' , 'solution.php' ] ,
130124 } ,
131-
132125 kotlin : {
133126 image : 'openjdk:17' ,
134- compile : [ 'kotlinc' , '/app/ Solution.kt' , '-include-runtime' , '-d' , '/app/ Solution.jar' ] ,
135- run : [ 'java' , '-jar' , '/app/ Solution.jar' ] ,
127+ compile : [ 'kotlinc' , 'Solution.kt' , '-include-runtime' , '-d' , 'Solution.jar' ] ,
128+ run : [ 'java' , '-jar' , 'Solution.jar' ] ,
136129 } ,
137-
138130 dart : {
139131 image : 'dart:3.0' ,
140- compile : [ 'dart' , 'compile' , 'exe' , '/app/ solution.dart' , '-o' , '/app/ solution' ] ,
141- run : [ '/app /solution' ] ,
132+ compile : [ 'dart' , 'compile' , 'exe' , 'solution.dart' , '-o' , 'solution' ] ,
133+ run : [ '. /solution' ] ,
142134 } ,
143-
144135 r : {
145136 image : 'r-base:latest' ,
146- run : [ 'Rscript' , '/app/ solution.R' ] ,
137+ run : [ 'Rscript' , 'solution.R' ] ,
147138 } ,
148-
149139 perl : {
150140 image : 'perl:5.36' ,
151- run : [ 'perl' , '/app/ solution.pl' ] ,
141+ run : [ 'perl' , 'solution.pl' ] ,
152142 } ,
153-
154143 typescript : {
155144 image : 'node:18' ,
156- compile : [ 'tsc' , '/app/ solution.ts' ] ,
157- run : [ 'node' , '/app/ solution.js' ] ,
145+ compile : [ 'npx' , ' tsc', 'solution.ts' , '--outFile' , 'solution.js '] ,
146+ run : [ 'node' , 'solution.js' ] ,
158147 defaultCode : '' ,
159148 } ,
160-
161149 haskell : {
162150 image : 'haskell:9.6' ,
163- compile : [ 'ghc' , '/app/ solution.hs' , '-o' , '/app/ solution' ] ,
164- run : [ '/app /solution' ] ,
151+ compile : [ 'ghc' , 'solution.hs' , '-o' , 'solution' ] ,
152+ run : [ '. /solution' ] ,
165153 } ,
166154} ;
0 commit comments