Skip to content
Merged
18 changes: 18 additions & 0 deletions rust/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Cargo
/target/

# Backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# IDEs and editors
/.idea/
/.vscode/
*.swp
*.swo
16 changes: 16 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "popcorn-cli"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = "4.5.3"
reqwest = { version = "0.11", features = ["json", "multipart"] }
tokio = { version = "1", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
ratatui = "0.26.1"
crossterm = "0.27.0"
anyhow = "1.0"
3 changes: 3 additions & 0 deletions rust/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Popcorn CLI (Rust Version)

Run `./build.sh` and then ` POPCORN_API_URL="http://127.0.0.1:8000" target/release/popcorn-cli ../../discord/discord-cluster-manager/reference-kernels/problems/pmpp/grayscale_py/submission.py`
8 changes: 8 additions & 0 deletions rust/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

echo "Building Popcorn CLI (Rust version)..."
cargo build --release

echo "Build complete! Binary is available at: target/release/popcorn-cli"
echo "Run with: ./target/release/popcorn-cli <filepath>"
Loading