diff --git a/README.md b/README.md index c66bb24..4d77d54 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,22 @@ Example code: eval(&"++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.").unwrap(); ``` -Also check out `examples/` directory \ No newline at end of file +Also check out `examples/` directory + +## Using this as command-line interpreter +There is an example `eval_file`, which you can compile to a standalone binary + +```sh +cargo b --release --example=eval_file +cd target/release/examples + +# those two are optional, they are needed to reduce the size of binary +# its recommended but if they fail its no big deal +strip eval_file +upx eval_file + +cp eval_file /usr/bin/eval_file # or other directory that is in $PATH +hash -r # run this just in case to refresh $PATH in your terminal + +eval_file file.b # 1st argument is the name of the file +``` \ No newline at end of file