| Crates.io | judger |
| lib.rs | judger |
| version | 0.5.1 |
| created_at | 2025-10-18 01:30:57.395104+00 |
| updated_at | 2025-12-24 09:55:38.559358+00 |
| description | A sandboxed environment for running untrusted code safely. |
| homepage | |
| repository | https://github.com/harkerhand/judger-rs |
| max_upload_size | |
| id | 1888677 |
| size | 593,275 |
A secure and efficient sandboxed code execution engine written in Rust. Ideal for online judges, educational platforms, and other systems requiring isolated execution of untrusted code.
You can install judger from Crates.io:
cargo install judger
Or, you can build it from the source:
git clone https://github.com/harkerhand/judger-rs.git
cd judger-rs
cargo build --release
Here is a simple example of how to use judger to run a command with resource limits:
Make sure to add judger to your Cargo.toml:
[dependencies]
judger = "0.1"
Then, on your main.rs:
use judger::{Config, SeccompRuleName, run};
fn main() {
let config = Config {
exe_path: "hello_world".to_string(),
input_path: "1.in".to_string(),
output_path: "1.out".to_string(),
error_path: "1.err".to_string(),
log_path: "judger.log".to_string(),
seccomp_rule_name: Some(SeccompRuleName::CCpp),
..Default::default()
};
let result = run(&config, None);
println!("{:?}", result);
}
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a pull request or open an issue.