-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from OJ-lab/slhmy/better-ide
Make dev more convient
- Loading branch information
Showing
38 changed files
with
397 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
.github/ | ||
.vscode/ | ||
tmp/ | ||
test-collection/ | ||
target/ | ||
rclone/ | ||
postman/ | ||
docker/ | ||
.devcontainer/ | ||
target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
target/ | ||
Cargo.lock | ||
scripts/thirdparty/ | ||
override.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Judger Serve (Debug)", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/target/debug/judger", | ||
"args": [ | ||
"serve" | ||
], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceFolder}/judger/workdirs/development", | ||
"environment": [], | ||
"externalConsole": false, | ||
"MIMode": "gdb", | ||
"preLaunchTask": "build judger", | ||
"setupCommands": [ | ||
{ | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Judger Judge (Debug)", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/target/debug/judger", | ||
"args": [ | ||
"judge", | ||
"--problem-slug", "hello_world", | ||
"--language", "cpp", | ||
"--src-path", "${workspaceFolder}/judger/workdirs/development/problem-package/hello_world/ans.cpp", | ||
], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceFolder}/judger/workdirs/development", | ||
"environment": [], | ||
"externalConsole": false, | ||
"MIMode": "gdb", | ||
"preLaunchTask": "build judger", | ||
"setupCommands": [ | ||
{ | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,6 @@ | ||
{ | ||
"material-icon-theme.folders.associations": { | ||
"judge-core": "core", | ||
"judge-cli": "command", | ||
"judge-service": "helper", | ||
"judge-server": "server", | ||
"postman": "api" | ||
}, | ||
"rust-analyzer.linkedProjects": [ | ||
"./judger/Cargo.toml", | ||
"./judger/Cargo.toml", | ||
"./judger/Cargo.toml" | ||
] | ||
"judger": "app" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "build judger", | ||
"type": "shell", | ||
"command": "cargo", | ||
"args": ["build", "--bin", "judger"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,13 @@ | ||
# Judger | ||
# Judger Application | ||
|
||
## Cli | ||
Judge server & cmd-line application built with `judger-core`. | ||
the two mode are base on the same core logic, cmd-line mode is more convenient for debugging and testing. | ||
|
||
This will be the easiest and closest way to try out the basic feature of Judger. | ||
In server mode, it fetches the judge tasks from [oj-lab-platform](https://github.com/OJ-lab/oj-lab-platform) | ||
and reports the result back. | ||
|
||
### Develop Usage | ||
In cmd-line mode, by providing the necessary arguments, it can run the code in a sandboxed environment. | ||
|
||
To run from the source code, try: | ||
## How to use | ||
|
||
``` shell | ||
cargo run --bin judger-cli -- [COMMAND] | ||
``` | ||
|
||
``` shell | ||
cargo run --bin judger-cli -- batch-judge --help | ||
``` | ||
|
||
## Server | ||
|
||
### How to run | ||
|
||
`cargo run --bin judger-server -- --env-path ./judger/src/server/environment/.env.development` | ||
|
||
### How to visit OpenAPI | ||
|
||
visit `{HOST}/swagger-ui/` | ||
Run `cargo run --bin judger` to get help. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.