Code · 2 files

Sample Rust Files

Rust is a systems language offering memory safety without a garbage collector. The Rust sample is a small program — a customer record, a VIP check and a formatted total — that is the same in every language we offer, so you can compare them side by side.

All 2 rust files

Download all with curl
Download 2 files (251 KB)Shell
# 2 files, 251 KB in total
while read -r url; do curl -LO --fail "$url"; done <<'EOF'
https://files.samplefiles.com/code/rs/main.rs
https://files.samplefiles.com/code/rs/sample-10000-lines.rs
EOF
FileSizeDetailsDownload
Sample Rust filemain.rs771 BDownload
Large Rust file (about 10,000 lines)sample-10000-lines.rs250 KB9,997 linesDownload