From 980baf11df313e659fb4b1dea1a126add15ac547 Mon Sep 17 00:00:00 2001
From: BoYanZh <boyanzh233@gmail.com>
Date: Thu, 19 Sep 2024 17:07:30 -0400
Subject: [PATCH] feat: use conf.json

---
 conf.json | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 conf.toml | 28 ----------------------------
 2 files changed, 53 insertions(+), 28 deletions(-)
 create mode 100644 conf.json
 delete mode 100644 conf.toml

diff --git a/conf.json b/conf.json
new file mode 100644
index 0000000..946e9f9
--- /dev/null
+++ b/conf.json
@@ -0,0 +1,53 @@
+{
+  "stages": [
+    {
+      "name": "sample",
+      "executor": {
+        "name": "sandbox",
+        "with": {
+          "default": {
+            "args": [
+              "./sample",
+              "--score",
+              "-1"
+            ],
+            "env": [
+              "PATH=/usr/bin:/bin"
+            ],
+            "cpuLimit": 10000000000,
+            "memoryLimit": 104857600,
+            "procLimit": 50,
+            "copyInCwd": true,
+            "copyIn": {
+              "sample": {
+                "src": "./../../../../../../build/sample",
+                "copyOut": [
+                  "stdout",
+                  "stderr"
+                ]
+              }
+            },
+            "stdin": {
+              "content": ""
+            },
+            "stdout": {
+              "name": "stdout",
+              "max": 4096
+            },
+            "stderr": {
+              "name": "stderr",
+              "max": 4096
+            }
+          }
+        }
+      },
+      "parser": {
+        "name": "sample",
+        "with": {
+          "score": 10,
+          "comment": " + comment from toml conf"
+        }
+      }
+    }
+  ]
+}
diff --git a/conf.toml b/conf.toml
deleted file mode 100644
index c282b95..0000000
--- a/conf.toml
+++ /dev/null
@@ -1,28 +0,0 @@
-skipGitea = true
-[[stages]]
-name = "sample"
-[stages.executor]
-name = "sandbox"
-[stages.executor.with.default]
-args = ["./sample", "--score", "-1"]
-env = ["PATH=/usr/bin:/bin"]
-cpuLimit = 10_000_000_000
-memoryLimit = 104_857_600
-procLimit = 50
-copyInCwd = true
-[stages.executor.with.default.copyIn.sample]
-src = "./../../../../../../build/sample"
-copyOut = ["stdout", "stderr"]
-[stages.executor.with.default.stdin]
-content = ""
-[stages.executor.with.default.stdout]
-name = "stdout"
-max = 4_096
-[stages.executor.with.default.stderr]
-name = "stderr"
-max = 4_096
-[stages.parser]
-name = "sample"
-[stages.parser.with]
-score = 10
-comment = " + comment from toml conf"