Skip to content

Commit e09a5d8

Browse files
committed
Add compile and compile-and-fix endpoints with example curl commands
1 parent 205d3d0 commit e09a5d8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
curl -X POST http://localhost:8000/mcp/compile-and-fix \
2+
-H "Content-Type: application/json" \
3+
-d '{
4+
"code": "[filename: Cargo.toml]\n[package]\nname = \"hello_world\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\n\n[filename: src/main.rs]\nfn main() {\n println!(\"Hello, World!\" // Missing closing parenthesis\n}",
5+
"description": "A simple hello world program",
6+
"max_attempts": 3
7+
}'

examples/compile_endpoint.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
curl -X POST http://localhost:8000/mcp/compile \
2+
-H "Content-Type: application/json" \
3+
-d '{
4+
"code": "[filename: Cargo.toml]\n[package]\nname = \"hello_world\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[dependencies]\n\n[filename: src/main.rs]\nfn main() {\n println!(\"Hello, World!\");\n}"
5+
}'

0 commit comments

Comments
 (0)