{"id":18925156,"url":"https://github.com/lyonsyonii/rust-quest-runner","last_synced_at":"2025-06-26T23:13:30.001Z","repository":{"id":208629484,"uuid":"722105124","full_name":"LyonSyonII/rust-quest-runner","owner":"LyonSyonII","description":"Rust code snippet runner for the Rust Quest book","archived":false,"fork":false,"pushed_at":"2024-04-05T16:11:39.000Z","size":96,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-31T17:46:12.031Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LyonSyonII.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-22T12:54:22.000Z","updated_at":"2023-11-22T12:54:31.000Z","dependencies_parsed_at":"2023-11-30T22:28:41.473Z","dependency_job_id":null,"html_url":"https://github.com/LyonSyonII/rust-quest-runner","commit_stats":null,"previous_names":["lyonsyonii/rust-quest-runner"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LyonSyonII%2Frust-quest-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LyonSyonII%2Frust-quest-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LyonSyonII%2Frust-quest-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LyonSyonII%2Frust-quest-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LyonSyonII","download_url":"https://codeload.github.com/LyonSyonII/rust-quest-runner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239921844,"owners_count":19718844,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T11:09:48.294Z","updated_at":"2025-02-20T22:15:30.763Z","avatar_url":"https://github.com/LyonSyonII.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Quest Runner\nRunner for the [Rust Quest book](https://garriga.dev/rust-quest) code snippets.\n\nBuilt as a faster alternative to the [Rust Playground](https://play.rust-lang.org/) by running inside a single container.\n\nCheck it out at [https://garriga.dev/rust-quest/]!\n\n## Installation\nJust `docker run lyonsyonii/rust-quest-runner` and send your requests to `{IP_ADDRESS}:3030/evaluate.json`.\n\n## Usage\nThe runner accepts requests in the following format:\n```json\n{\n    \"code\": \"fn main() { println!(\\\"Hello, World!\\\") } \"\n}\n```\n\nAnd replies with:\n```json\n{\n    \"ok\": {\n        \"stdout\": \"Hello, World!\",\n        \"stderr\": \"Compiler output\"\n    }\n}\n```\nIf the request went well.\n\nIf some error was encountered, it will send one of the following replies:\n- STD,\n- CORE,\n- EXTERN_C,\n- UNSAFE,\n- TEMP_DIR,\n- INPUT_FILE_CREATE,\n- INPUT_FILE_OPEN,\n- INPUT_FILE_WRITE,\n- BUILD,\n- COMPILER: \"Compiler error message\",\n- TIMEOUT,\n- EXECUTION: \"Execution error message\",\n\n### Environment variables\n| Name              | Default | Description                                                                                                 |\n| ----------------- | ------- | ----------------------------------------------------------------------------------------------------------- |\n| PORT              | 3030    | Port to listen on.                                                                                          |\n| AUTH              | \"\"      | Customizable authorization token, sets the \"Authorization\" header.                                          |\n| ORIGINS_WHITELIST | \"\"      | Comma separated list of allowed origins, sets `cors`.                                                       |\n| SEMAPHORE_PERMITS | 5       | How many requests to allow at the same time, to avoid overload.                                             |\n| SEMAPHORE_WAIT    | 500ms   | Time in milliseconds that a request will wait when the number of requests is larger than SEMAPHORE_PERMITS. |\n| KILL_TIMEOUT      | 500ms   | Time in milliseconds that a request will be killed if it takes longer than.                                 |\n\n## Safety\nThe runner does not allow any request with:\n- Unsafe code (and the `unsafe` keyword)\n- `extern \"C\"`\n- `::std`\n- `::core`\n\nAdditionally, it redeclares the `std` and `core` modules to only allow certain modules to be used.  \nTo see all the allowed modules, see the [`custom std`](project-template/custom-std/src/lib.rs).  \n`custom-core` does not export anything.\n\nThis should eliminate all file and network access from the executed code.  \nIf you find any vulnerabilities, please [open an issue](https://github.com/lyonsyonii/rust-quest-runner/issues).\n\n## License\n[MIT](https://www.tldrlegal.com/license/mit-license)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyonsyonii%2Frust-quest-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyonsyonii%2Frust-quest-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyonsyonii%2Frust-quest-runner/lists"}