Skip to content

Instantly share code, notes, and snippets.

@bvssvni
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bvssvni/9408082 to your computer and use it in GitHub Desktop.
Save bvssvni/9408082 to your computer and use it in GitHub Desktop.
A 'rusti' interpreter script (by mcpherrin)
#!/bin/sh
while true; do
echo -n " > "
read line
TMP=`mktemp`
rustc - -o $TMP <<EOF
#[feature(globs, macro_rules, struct_variant)];
// extern mod extra;
fn main() {
let r = { $line };
println!("{:?}", r);
}
EOF
$TMP
rm $TMP
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment