judge_core/judge/
mod.rs

1use std::path::PathBuf;
2
3use crate::run::{executor::Executor, sandbox::RlimitConfigs};
4
5pub mod common;
6pub mod interact;
7pub mod result;
8
9#[derive(Debug, Clone)]
10pub struct RuntimeConfig {
11    pub rlimit_configs: RlimitConfigs,
12}
13
14/// When `executor` is `None`, default checker will be used.
15#[derive(Debug, Clone)]
16pub struct CheckerConfig {
17    pub executor: Option<Executor>,
18    pub output_file_path: PathBuf,
19}
20
21#[derive(Debug, Clone)]
22pub struct ProgramConfig {
23    pub executor: Executor,
24    pub output_file_path: PathBuf,
25}
26
27#[derive(Debug, Clone)]
28pub struct TestDataConfig {
29    pub input_file_path: PathBuf,
30    pub answer_file_path: PathBuf,
31}
32
33#[derive(Debug, Clone)]
34pub struct JudgeConfig {
35    pub test_data: TestDataConfig,
36    pub runtime: RuntimeConfig,
37    pub program: ProgramConfig,
38    pub checker: CheckerConfig,
39}