runrust 10.34.2

Command-line tool to run Rust "scripts" which can make use of crates.
1
2
3
4
5
6
7
8
9
10
#!/bin/sh
set -e -u

echo "First:"
echo "line1\nline2" | runrust --loop \
    "let mut n=0; move |l| {n+=1; println!(\"{:>6}: {}\",n,l.trim_end())}"

echo "Second:"
echo "line1\nline2" | runrust --count --loop \
    "|l,n| println!(\"{:>6}: {}\", n, l.trim_end())"