add guide to install as a cli
This commit is contained in:
parent
5049f1d809
commit
b69f495a3d
18
README.md
18
README.md
|
@ -25,3 +25,21 @@ eval(&"++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.
|
|||
```
|
||||
|
||||
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
|
||||
```
|
Loading…
Reference in New Issue